From: Gunnar Wrobel
Date: Mon, 29 Nov 2010 15:41:56 +0000 (+0100)
Subject: Start test suite.
X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=792dd23760e711a10d5ad1e11acb74d09f0c36e0;p=horde.git
Start test suite.
---
diff --git a/framework/Prefs/test/Horde/Prefs/AllTests.php b/framework/Prefs/test/Horde/Prefs/AllTests.php
new file mode 100644
index 000000000..a048fc7e0
--- /dev/null
+++ b/framework/Prefs/test/Horde/Prefs/AllTests.php
@@ -0,0 +1,50 @@
+
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Prefs
+ */
+
+/**
+ * Define the main method
+ */
+if (!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'Horde_Prefs_AllTests::main');
+}
+
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
+
+/**
+ * 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 Prefs
+ * @subpackage UnitTests
+ * @author Gunnar Wrobel
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Prefs
+ */
+class Horde_Prefs_AllTests extends Horde_Test_AllTests
+{
+}
+
+Horde_Prefs_AllTests::init('Horde_Prefs', __FILE__);
+
+if (PHPUnit_MAIN_METHOD == 'Horde_Prefs_AllTests::main') {
+ Horde_Prefs_AllTests::main();
+}
diff --git a/framework/Prefs/test/Horde/Prefs/Autoload.php b/framework/Prefs/test/Horde/Prefs/Autoload.php
new file mode 100644
index 000000000..0b2b669f5
--- /dev/null
+++ b/framework/Prefs/test/Horde/Prefs/Autoload.php
@@ -0,0 +1,23 @@
+
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Prefs
+ */
+
+require_once 'Horde/Test/Autoload.php';
+
+/** Catch strict standards */
+error_reporting(E_ALL | E_STRICT);
diff --git a/framework/Prefs/test/Horde/Prefs/Unit/Storage/FileTest.php b/framework/Prefs/test/Horde/Prefs/Unit/Storage/FileTest.php
new file mode 100644
index 000000000..310326dc0
--- /dev/null
+++ b/framework/Prefs/test/Horde/Prefs/Unit/Storage/FileTest.php
@@ -0,0 +1,42 @@
+
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Prefs
+ */
+
+/**
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/../../Autoload.php';
+
+/**
+ * Base for session testing.
+ *
+ * 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 Prefs
+ * @author Gunnar Wrobel
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Prefs
+ */
+class Horde_Prefs_Unit_Storage_FileTest extends PHPUnit_Framework_TestCase
+{
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testMissingDirectory()
+ {
+ $b = new Horde_Prefs_Storage_File('nobody');
+ }
+}
\ No newline at end of file
diff --git a/framework/Prefs/test/Horde/Prefs/phpunit.xml b/framework/Prefs/test/Horde/Prefs/phpunit.xml
new file mode 100644
index 000000000..502d3c9b8
--- /dev/null
+++ b/framework/Prefs/test/Horde/Prefs/phpunit.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ ../../../lib
+
+
+