From 66cfea7f86be0185f6acd38a289df19563ae45a4 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Wed, 1 Dec 2010 21:09:39 +0100 Subject: [PATCH] Convert the getCryptedPassword test to PHPUnit. --- framework/Auth/test/Horde/Auth/Unit/AuthTest.php | 12 ++++++++++-- framework/Auth/test/Horde/Auth/credentials.php | Bin 909 -> 0 bytes framework/Auth/test/Horde/Auth/getCryptedPassword.phpt | Bin 1002 -> 0 bytes 3 files changed, 10 insertions(+), 2 deletions(-) delete mode 100644 framework/Auth/test/Horde/Auth/credentials.php delete mode 100644 framework/Auth/test/Horde/Auth/getCryptedPassword.phpt 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 da51702fe41510a86a3b69c87bb5233d278397df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 909 zcma))U5}bT6o$R_SC9?Kw%RQpgXpH+w8APNx_g3tkE@Yk1agWYY?q%$|? zym{uFcTUddFGW-gnbBxSji|3Kto$&?Ev4qz^IxO_xw*pG@CWyt+xP^6sJm z9N@vtpx5JtaTr^st$hQ9I876Vy~Lqq?{qbM=$V-hG`p-;S(%aRfP~2=Mz+W(;IMe^ zNt&Z4Ul!e0C z-v=m6zl*cP)EBkho8jXFo&jt?v?duQ)4EP~f<4VvOAMQx!1bJF$xo~1(ini1p$DU+ zIHEP5ib!1%kB|7CLnp8}IqYufj@y<1J+FRP6D4iEY;*mK;t0B}A9-8!t*x5u59?^V zz04o$W`1SFmOqVUMRuZE0=(BQYjE_<>Y3fUSBCDEgQGc4mXLlh==u4)QKSUVI3zPq o*2d8YRzCK|z-%%LM4ksMbb))%O#;BOt|$tC<6RL19oOyDPZI|6ivR!s diff --git a/framework/Auth/test/Horde/Auth/getCryptedPassword.phpt b/framework/Auth/test/Horde/Auth/getCryptedPassword.phpt deleted file mode 100644 index 2aa5924edba27a7a2f25650837fe4d86ddf7ff25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1002 zcma)3Yj4^x6y>vjMN~zi9RorPDNV~NNW&{I!oq;EO~_6hk~FW{2?VD7_a%jC(llwa zEnB|#+~a$WtJQ^SEUHy7jHpGn-86Azc}Eh39^-^qI%4dQXRdF!gs=outNqbL&EXG^ zu@eJ8$!qFTvW-HMaOF3S`sc*;Yk9VO|JSsUP&eHD4Pd!6L;<z z`5>kfaXbml!WK6Q*%#jZRg$RzUyVM&Si1GS zx^QxL#%iGrcOCF1LT(c{TCrptupndSSk)p-ZnmZ_UP<)%<@RE*>8r+6z_hady}Ui z&W6v6p;+$)yXKxOZM^e8OKoqisi}766x}s#L#iV@$pV_)rm4SZu5N>IpQ6K}*#NAN zI5L!v