From 2f0854ff09fcbae0e5ed3c9b47fadf81766995b8 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sat, 20 Oct 2018 18:58:28 +0200
Subject: [PATCH] Update tests

---
 tests/lib/SimpleSAML/Utils/CryptoTest.php | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tests/lib/SimpleSAML/Utils/CryptoTest.php b/tests/lib/SimpleSAML/Utils/CryptoTest.php
index 231945969..16c145ad3 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
      */
-- 
GitLab