[TASK] Use new instead of makeInstance in unit tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / saltedpasswords / Tests / Unit / Salt / BlowfishSaltTest.php
index 30ae4b3..3892b7e 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;
 
 /**
  * Testcase for BlowfishSalt
@@ -112,7 +111,7 @@ class BlowfishSaltTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $this->skipTestIfBlowfishIsNotAvailable();
         $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));
         $saltedHashPassword = $this->objectInstance->getHashedPassword($password, $salt);