From: Gunnar Wrobel
Date: Wed, 1 Dec 2010 16:03:05 +0000 (+0100)
Subject: Start conversion to PHPUnit.
X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c296d3247a0b7b05ff7dd33a22ea240302ad4fed;p=horde.git
Start conversion to PHPUnit.
---
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 000000000..91948b715
Binary files /dev/null and b/framework/Auth/test/Horde/Auth/TestCase.php differ
diff --git a/framework/Auth/test/Horde/Auth/Unit/AuthTest.php b/framework/Auth/test/Horde/Auth/Unit/AuthTest.php
new file mode 100644
index 000000000..f7be74505
--- /dev/null
+++ b/framework/Auth/test/Horde/Auth/Unit/AuthTest.php
@@ -0,0 +1,44 @@
+
+ * @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 4bc6e27f4..000000000
Binary files a/framework/Auth/test/Horde/Auth/getSalt.phpt and /dev/null differ