Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoodwin committed Jan 19, 2021
1 parent 6d101b7 commit 378ee41
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/PacryptTest.php
Expand Up @@ -25,23 +25,17 @@ 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);

$this->assertNotEmpty($hash);
$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() {
Expand Down

0 comments on commit 378ee41

Please sign in to comment.