diff --git a/tests/lib/SimpleSAML/Utils/CryptoTest.php b/tests/lib/SimpleSAML/Utils/CryptoTest.php index 16c145ad38ccacc66ef3e80277f65df5adf632fb..044fb054a460e7c3d941c9f8ec696c51bac97df9 100644 --- a/tests/lib/SimpleSAML/Utils/CryptoTest.php +++ b/tests/lib/SimpleSAML/Utils/CryptoTest.php @@ -224,6 +224,20 @@ PHP; $this->assertTrue($res); } + /** + * @covers \SimpleSAML\Utils\Crypto::pwValid + */ + public function testBadPwInvalid() + { + $pw = "password"; + $pw2 = "password2"; + + $hash = Crypto::pwHash($pw); + $res = Crypto::pwValid($hash, $pw2); + + $this->assertFalse($res); + } + /** * @covers \SimpleSAML\Utils\Crypto::pwValid