diff --git a/tests/PacryptTest.php b/tests/PacryptTest.php index ccf89579..973f9197 100644 --- a/tests/PacryptTest.php +++ b/tests/PacryptTest.php @@ -25,11 +25,9 @@ public function testMySQLEncrypt() { $this->markTestSkipped('Not using MySQL'); } - $hash = _pacrypt_mysql_encrypt('test'); + $hash = _pacrypt_mysql_encrypt('test1'); - sleep(1); - - $hash2 = _pacrypt_mysql_encrypt('test'); + $hash2 = _pacrypt_mysql_encrypt('test2'); $this->assertNotEquals($hash, $hash2); @@ -37,11 +35,7 @@ public function testMySQLEncrypt() { $this->assertNotEquals('test', $hash); $this->assertNotEquals('test', $hash2); - $this->assertEquals( - $hash, - _pacrypt_mysql_encrypt('test', $hash), - "test should encrypt to : $hash ..." - ); + $this->assertTrue( hash_equals($hash, _pacrypt_mysql_encrypt('test1', $hash) ), "hashes should equal...."); } public function testAuthlib() {