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