Convert the getCryptedPassword test to PHPUnit.
authorGunnar Wrobel <p@rdus.de>
Wed, 1 Dec 2010 20:09:39 +0000 (21:09 +0100)
committerGunnar Wrobel <p@rdus.de>
Wed, 1 Dec 2010 21:10:16 +0000 (22:10 +0100)
framework/Auth/test/Horde/Auth/Unit/AuthTest.php
framework/Auth/test/Horde/Auth/credentials.php [deleted file]
framework/Auth/test/Horde/Auth/getCryptedPassword.phpt [deleted file]

index f7be745..4c2c89f 100644 (file)
@@ -37,8 +37,16 @@ class Horde_Auth_Unit_AuthTest extends Horde_Auth_TestCase
     /**
      * @dataProvider getCredentials
      */
-    public function testGetSalt($encryption, $password, $result)
+    public function testGetSalt($encryption, $password, $salt)
     {
-        $this->assertEquals($result, Horde_Auth::getSalt($encryption, $password, 'foobar'));
+        $this->assertEquals($salt, Horde_Auth::getSalt($encryption, $password, 'foobar'));
+    }
+
+    /**
+     * @dataProvider getCredentials
+     */
+    public function testGetCryptedPassword($encryption, $password, $salt)
+    {
+        $this->assertEquals($password, Horde_Auth::getCryptedPassword('foobar', $password, $encryption, false));
     }
 }
\ No newline at end of file
diff --git a/framework/Auth/test/Horde/Auth/credentials.php b/framework/Auth/test/Horde/Auth/credentials.php
deleted file mode 100644 (file)
index da51702..0000000
Binary files a/framework/Auth/test/Horde/Auth/credentials.php and /dev/null differ
diff --git a/framework/Auth/test/Horde/Auth/getCryptedPassword.phpt b/framework/Auth/test/Horde/Auth/getCryptedPassword.phpt
deleted file mode 100644 (file)
index 2aa5924..0000000
Binary files a/framework/Auth/test/Horde/Auth/getCryptedPassword.phpt and /dev/null differ