[TASK] Use new instead of makeInstance in unit tests
[Packages/TYPO3.CMS.git] / typo3 / sysext / saltedpasswords / Tests / Unit / Salt / SaltFactoryTest.php
index 52f0657..c6c08af 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 SaltFactory
@@ -77,13 +76,13 @@ class SaltFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         // used for MD5 and PHPass salted hashing
         $byteLength = 3;
         $reqLengthBase64 = (int)ceil($byteLength * 8 / 6);
-        $randomBytes = GeneralUtility::makeInstance(Random::class)->generateRandomBytes($byteLength);
+        $randomBytes = (new Random())->generateRandomBytes($byteLength);
         $this->assertTrue(strlen($this->objectInstance->base64Encode($randomBytes, $byteLength)) == $reqLengthBase64);
         // 16 Bytes should result in a 22 char length base64 encoded string
         // used for Blowfish salted hashing
         $byteLength = 16;
         $reqLengthBase64 = (int)ceil($byteLength * 8 / 6);
-        $randomBytes = GeneralUtility::makeInstance(Random::class)->generateRandomBytes($byteLength);
+        $randomBytes = (new Random())->generateRandomBytes($byteLength);
         $this->assertTrue(strlen($this->objectInstance->base64Encode($randomBytes, $byteLength)) == $reqLengthBase64);
     }