From c036787a1ace369d36cc5d3036d882a92d28dedd Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 5 Dec 2014 00:20:19 +0100 Subject: [PATCH] crypt_random_string() -> Random::string() --- tests/Unit/Crypt/RandomTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Crypt/RandomTest.php b/tests/Unit/Crypt/RandomTest.php index f72640fe..d6cc57bb 100644 --- a/tests/Unit/Crypt/RandomTest.php +++ b/tests/Unit/Crypt/RandomTest.php @@ -5,6 +5,8 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ +use phpseclib\Crypt\Random; + class Unit_Crypt_RandomTest extends PhpseclibTestCase { public function stringLengthData() @@ -21,7 +23,7 @@ class Unit_Crypt_RandomTest extends PhpseclibTestCase { $this->assertSame( $length, - strlen(crypt_random_string($length)), + strlen(Random::string($length)), 'Failed asserting that a string of expected length was generated.' ); } @@ -34,7 +36,7 @@ class Unit_Crypt_RandomTest extends PhpseclibTestCase { $values = array(); for ($i = 0; $i < 10000; ++$i) { - $rand = crypt_random_string(16); + $rand = Random::string(16); $this->assertSame(16, strlen($rand)); $this->assertArrayNotHasKey( $rand,