From: Gunnar Wrobel
Date: Wed, 1 Dec 2010 20:09:39 +0000 (+0100) Subject: Convert the getCryptedPassword test to PHPUnit. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=66cfea7f86be0185f6acd38a289df19563ae45a4;p=horde.git Convert the getCryptedPassword test to PHPUnit. --- diff --git a/framework/Auth/test/Horde/Auth/Unit/AuthTest.php b/framework/Auth/test/Horde/Auth/Unit/AuthTest.php index f7be74505..4c2c89fb1 100644 --- a/framework/Auth/test/Horde/Auth/Unit/AuthTest.php +++ b/framework/Auth/test/Horde/Auth/Unit/AuthTest.php @@ -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 index da51702fe..000000000 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 index 2aa5924ed..000000000 Binary files a/framework/Auth/test/Horde/Auth/getCryptedPassword.phpt and /dev/null differ