diff --git a/tests/lib/SimpleSAML/Utils/CryptoTest.php b/tests/lib/SimpleSAML/Utils/CryptoTest.php index 23194596991d1cde678606bcb22061b0d012a0dd..16c145ad38ccacc66ef3e80277f65df5adf632fb 100644 --- a/tests/lib/SimpleSAML/Utils/CryptoTest.php +++ b/tests/lib/SimpleSAML/Utils/CryptoTest.php @@ -157,6 +157,7 @@ PHP; /** * @covers \SimpleSAML\Utils\Crypto::pwHash + * @deprecated To be removed for 2.0 */ public function testGoodPwHash() { @@ -174,8 +175,10 @@ PHP; $this->assertEquals($expected, $res); } + /** * @covers \SimpleSAML\Utils\Crypto::pwHash + * @deprecated To be removed for 2.0 */ public function testGoodSaltedPwHash() { @@ -196,6 +199,7 @@ PHP; /** * @expectedException \SimpleSAML\Error\Exception + * @deprecated To be removed for 2.0 * * @covers \SimpleSAML\Utils\Crypto::pwHash */ @@ -211,6 +215,21 @@ PHP; * @covers \SimpleSAML\Utils\Crypto::pwValid */ public function testGoodPwValid() + { + $pw = "password"; + + $hash = Crypto::pwHash($pw); + $res = Crypto::pwValid($hash, $pw); + + $this->assertTrue($res); + } + + + /** + * @covers \SimpleSAML\Utils\Crypto::pwValid + * @deprecated To be removed for 2.0 + */ + public function testGoodPwValidOld() { $pw = "password"; $algorithm = "SHA1"; @@ -223,6 +242,7 @@ PHP; /** * @covers \SimpleSAML\Utils\Crypto::pwValid + * @deprecated To be removed for 2.0 */ public function testGoodSaltedPwValid() { @@ -238,6 +258,7 @@ PHP; /** * @expectedException \SimpleSAML\Error\Exception + * @deprecated To be removed for 2.0 * * @covers \SimpleSAML\Utils\Crypto::pwValid */