From d6c210984ca8ce32eb3bef517a8a7e9e00c33f8c Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 5 Dec 2014 00:18:45 +0100 Subject: [PATCH] Use assertArrayNotHasKey(). --- tests/Unit/Crypt/RandomTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Crypt/RandomTest.php b/tests/Unit/Crypt/RandomTest.php index 9be9940f..f72640fe 100644 --- a/tests/Unit/Crypt/RandomTest.php +++ b/tests/Unit/Crypt/RandomTest.php @@ -36,8 +36,9 @@ class Unit_Crypt_RandomTest extends PhpseclibTestCase for ($i = 0; $i < 10000; ++$i) { $rand = crypt_random_string(16); $this->assertSame(16, strlen($rand)); - $this->assertFalse( - isset($values[$rand]), + $this->assertArrayNotHasKey( + $rand, + $values, 'Failed asserting that generated value does not exist in set.' ); $values[$rand] = true;