From c296d3247a0b7b05ff7dd33a22ea240302ad4fed Mon Sep 17 00:00:00 2001
From: Gunnar Wrobel
Date: Wed, 1 Dec 2010 17:03:05 +0100
Subject: [PATCH] Start conversion to PHPUnit.
---
framework/Auth/test/Horde/Auth/AllTests.php | 13 ++++++-
framework/Auth/test/Horde/Auth/Autoload.php | 21 +++++++++++
framework/Auth/test/Horde/Auth/TestCase.php | Bin 0 -> 2048 bytes
framework/Auth/test/Horde/Auth/Unit/AuthTest.php | 44 +++++++++++++++++++++++
framework/Auth/test/Horde/Auth/getSalt.phpt | Bin 530 -> 0 bytes
5 files changed, 77 insertions(+), 1 deletion(-)
create mode 100644 framework/Auth/test/Horde/Auth/Autoload.php
create mode 100644 framework/Auth/test/Horde/Auth/TestCase.php
create mode 100644 framework/Auth/test/Horde/Auth/Unit/AuthTest.php
delete mode 100644 framework/Auth/test/Horde/Auth/getSalt.phpt
diff --git a/framework/Auth/test/Horde/Auth/AllTests.php b/framework/Auth/test/Horde/Auth/AllTests.php
index ce805411d..02777bb89 100644
--- a/framework/Auth/test/Horde/Auth/AllTests.php
+++ b/framework/Auth/test/Horde/Auth/AllTests.php
@@ -25,8 +25,19 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
require_once 'Horde/Test/AllTests.php';
/**
- * @package Horde_Auth
+ * Combine the tests for this package.
+ *
+ * Copyright 2007-2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Horde
+ * @package Auth
* @subpackage UnitTests
+ * @author Gunnar Wrobel
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Auth
*/
class Horde_Auth_AllTests extends Horde_Test_AllTests
{
diff --git a/framework/Auth/test/Horde/Auth/Autoload.php b/framework/Auth/test/Horde/Auth/Autoload.php
new file mode 100644
index 000000000..a5e0b3538
--- /dev/null
+++ b/framework/Auth/test/Horde/Auth/Autoload.php
@@ -0,0 +1,21 @@
+
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Auth
+ */
+
+require_once 'Horde/Test/Autoload.php';
+
+/** Catch strict standards */
+error_reporting(E_ALL | E_STRICT);
+
+/** Load the basic test definition */
+require_once dirname(__FILE__) . '/TestCase.php';
diff --git a/framework/Auth/test/Horde/Auth/TestCase.php b/framework/Auth/test/Horde/Auth/TestCase.php
new file mode 100644
index 0000000000000000000000000000000000000000..91948b715edcc78b54df0908fd14f1da19524e19
GIT binary patch
literal 2048
zcmd^9TXNz?6s0PE%qF^~TxI-1LIN2l-v
z$?vRYx&MI6p6gbI^hW0V~3QB0}BJuCgGHYh4X&
z5GHOEg2q1f(SQ`$5zYYs-3XhA13$*lSVJ4J7`RKQQ^ZK3AHttQm(G|rDGne*uw;C7
zk}!lAEO4YFAG}M8f2M}bgj7xRzQFsgfkIXxTMni1kAjeoi(T8HKoV;r
zm^oR5a1J#-2)4%c==W=#Mo
zccH?sc2)&F3*=G4bxhX;VMGB&268uC(%So7U&?%*;zVZ#0V@fO!WkP;6(bXc)P+8&Fq_%h
zLHQ0Nn&1#XjA33W&UlosUFbCSp&OoFf>SGsbcp%x^z8D#kO6@vKYm-XN)h|%C0N3x
zx1|>-#DVmFWYmwGr;E
zZ6N*|^`ffoN2%o!hm+35G0fXHl7ih?S#{@$ZttXwtreNO$PVLfLHuSW$^1OGLpN*O&M!YA7%m0u9L){
z)fd-6pFM+gRKi$t&hK?
z&gNJ}dnrAX@57ZiYa17Np2>rVewj8per^V%qSY?m7_UflR`tPRu$C4InvT2Pd^vQ+
zPL;Rj06C(_
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Auth
+ */
+
+/**
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/../Autoload.php';
+
+/**
+ * Test the Horde_Auth:: class.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Horde
+ * @package Auth
+ * @subpackage UnitTests
+ * @author Gunnar Wrobel
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Auth
+ */
+class Horde_Auth_Unit_AuthTest extends Horde_Auth_TestCase
+{
+ /**
+ * @dataProvider getCredentials
+ */
+ public function testGetSalt($encryption, $password, $result)
+ {
+ $this->assertEquals($result, Horde_Auth::getSalt($encryption, $password, 'foobar'));
+ }
+}
\ No newline at end of file
diff --git a/framework/Auth/test/Horde/Auth/getSalt.phpt b/framework/Auth/test/Horde/Auth/getSalt.phpt
deleted file mode 100644
index 4bc6e27f4a309168b112b77140df7c977baa56ac..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 530
zcmah_+e!m55EXojKM~5pZf&<0+ImTAiW$2qhYe&^tw!w>*KmbcS=f*HdPZf0jw`o#+do&z-wY(sY}dz