[TASK] Use new instead of makeInstance in unit tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / saltedpasswords / Tests / Unit / Salt / Md5SaltTest.php
index 200c7b9..8f9ca3d 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Saltedpasswords\Tests\Unit\Salt;
  */
 
 use TYPO3\CMS\Core\Crypto\Random;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Testcases for Md5Salt
@@ -111,7 +110,7 @@ class Md5SaltTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $password = 'password';
         // custom salt without setting
-        $randomBytes = GeneralUtility::makeInstance(Random::class)->generateRandomBytes($this->objectInstance->getSaltLength());
+        $randomBytes = (new Random())->generateRandomBytes($this->objectInstance->getSaltLength());
         $salt = $this->objectInstance->base64Encode($randomBytes, $this->objectInstance->getSaltLength());
         $this->assertTrue($this->objectInstance->isValidSalt($salt), $this->getWarningWhenMethodUnavailable());
         $saltedHashPassword = $this->objectInstance->getHashedPassword($password, $salt);