* @subpackage UnitTests
*/
-if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Argv_AllTests::main');
-}
-
if (!function_exists('_')) {
function _($t) {
return $t;
}
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
/**
- * @package Horde_Argv
- * @subpackage UnitTests
+ * Define the main method
*/
-class Horde_Argv_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Catch strict standards
- error_reporting(E_ALL | E_STRICT);
-
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- // Test base classes and helper objects
- require_once dirname(__FILE__) . '/TestCase.php';
- require_once dirname(__FILE__) . '/ConflictTestCase.php';
- require_once dirname(__FILE__) . '/InterceptedException.php';
- require_once dirname(__FILE__) . '/InterceptingParser.php';
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Argv');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
+if (!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'Horde_Url_AllTests::main');
+}
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Argv_' . $class);
- }
- }
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
- return $suite;
- }
+/* Test base classes and helper objects */
+require_once dirname(__FILE__) . '/TestCase.php';
+require_once dirname(__FILE__) . '/ConflictTestCase.php';
+require_once dirname(__FILE__) . '/InterceptedException.php';
+require_once dirname(__FILE__) . '/InterceptingParser.php';
+/**
+ * @package Horde_Url
+ * @subpackage UnitTests
+ */
+class Horde_Url_AllTests extends Horde_Test_AllTests
+{
}
-if (PHPUnit_MAIN_METHOD == 'Horde_Argv_AllTests::main') {
- Horde_Argv_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Horde_Url_AllTests::main') {
+ Horde_Url_AllTests::main('Horde_Url', __FILE__);
}
<?php
/**
- * All tests for the Horde_Auth:: package.
+ * All tests for the Horde_Auth package.
*
* PHP version 5
*
define('PHPUnit_MAIN_METHOD', 'Horde_Auth_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2007-2009 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
+ * @package Horde_Auth
* @subpackage UnitTests
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Auth
*/
-class Horde_Auth_AllTests
+class Horde_Auth_AllTests extends Horde_Test_AllTests
{
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Auth');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/",
- '\\1', $pathname));
- $suite->addTestSuite('Horde_Auth_' . $class);
- }
- }
-
- return $suite;
- }
}
if (PHPUnit_MAIN_METHOD == 'Horde_Auth_AllTests::main') {
- Horde_Auth_AllTests::main();
+ Horde_Auth_AllTests::main('Horde_Auth', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Constraint_AllTests::main');
+ define('PHPUnit_MAIN_METHOD', 'Horde_Horde_Constraint_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
-class Horde_Constraint_AllTests
+/**
+ * @package Horde_Horde_Constraint
+ * @subpackage UnitTests
+ */
+class Horde_Horde_Constraint_AllTests extends Horde_Test_AllTests
{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Constraint');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Constraint_' . $class);
- }
- }
-
- return $suite;
- }
}
-if (PHPUnit_MAIN_METHOD == 'Horde_Constraint_AllTests::main') {
- Horde_Constraint_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Horde_Horde_Constraint_AllTests::main') {
+ Horde_Horde_Constraint_AllTests::main('Horde_Horde_Constraint', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Controller_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
/**
- * @author Mike Naberezny <mike@maintainable.com>
- * @author Derek DeVries <derek@maintainable.com>
- * @author Chuck Hagenbuch <chuck@horde.org>
- * @license http://opensource.org/licenses/bsd-license.php
- * @category Horde
* @package Horde_Controller
* @subpackage UnitTests
*/
-class Horde_Controller_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Controller');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Controller_' . $class);
- }
- }
-
- return $suite;
- }
-
+class Horde_Controller_AllTests extends Horde_Test_AllTests
+{
}
if (PHPUnit_MAIN_METHOD == 'Horde_Controller_AllTests::main') {
- Horde_Controller_AllTests::main();
+ Horde_Controller_AllTests::main('Horde_Controller', __FILE__);
}
<?php
/**
* @category Horde
- * @package Date
+ * @package Horde_Date
* @subpackage UnitTests
* @copyright 2008-2009 The Horde Project (http://www.horde.org/)
* @license http://opensource.org/licenses/bsd-license.php
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Date_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-class Horde_Date_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Date');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Date_' . $class);
- }
- }
-
- return $suite;
- }
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
+/**
+ * @package Horde_Date
+ * @subpackage UnitTests
+ */
+class Horde_Date_AllTests extends Horde_Test_AllTests
+{
}
if (PHPUnit_MAIN_METHOD == 'Horde_Date_AllTests::main') {
- Horde_Date_AllTests::main();
+ Horde_Date_AllTests::main('Horde_Date', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Db_AllTests::main');
+ define('PHPUnit_MAIN_METHOD', 'Horde_Url_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
require_once dirname(__FILE__) . '/Adapter/MissingTest.php';
+/* Ensure a default timezone is set. */
+date_default_timezone_set('America/New_York');
+
/**
- * @author Mike Naberezny <mike@maintainable.com>
- * @author Derek DeVries <derek@maintainable.com>
- * @author Chuck Hagenbuch <chuck@horde.org>
- * @license http://opensource.org/licenses/bsd-license.php
- * @category Horde
- * @package Horde_Db
+ * @package Horde_Url
* @subpackage UnitTests
*/
-class Horde_Db_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Catch strict standards
- error_reporting(E_ALL | E_STRICT);
-
- // Ensure a default timezone is set.
- date_default_timezone_set('America/New_York');
-
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- // Build the suite
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Db');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- // Handle the Adapter tests
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir . '/Adapter')) as $file) {
- if ($file->isFile() && preg_match('/Suite.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Db_' . $class);
- }
- }
-
- // Add other tests
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && !preg_match("/^{$baseregexp}Adapter/", $file->getPathname()) && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Db_' . $class);
- }
- }
-
-
- return $suite;
- }
-
+class Horde_Url_AllTests extends Horde_Test_AllTests
+{
}
-if (PHPUnit_MAIN_METHOD == 'Horde_Db_AllTests::main') {
- Horde_Db_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Horde_Url_AllTests::main') {
+ Horde_Url_AllTests::main('Horde_Url', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Feed_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
-class Horde_Feed_AllTests
+/**
+ * @package Horde_Feed
+ * @subpackage UnitTests
+ */
+class Horde_Feed_AllTests extends Horde_Test_AllTests
{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Feed');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Feed_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Feed_AllTests::main') {
- Horde_Feed_AllTests::main();
+ Horde_Feed_AllTests::main('Horde_Feed', __FILE__);
}
}
/**
- * The Autoloader allows us to omit "require/include" statements.
+ * Prepare the test setup.
*/
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2009 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 History
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=History
+ * @package Horde_History
+ * @subpackage UnitTests
*/
-class Horde_History_AllTests
+class Horde_History_AllTests extends Horde_Test_AllTests
{
-
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- // Catch strict standards
- error_reporting(E_ALL | E_STRICT);
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - History');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_History_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_History_AllTests::main') {
- Horde_History_AllTests::main();
+ Horde_History_AllTests::main('Horde_History', __FILE__);
}
* @license http://opensource.org/licenses/bsd-license.php
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Http_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
-class Horde_Http_AllTests
+/**
+ * @package Horde_Http
+ * @subpackage UnitTests
+ */
+class Horde_Http_AllTests extends Horde_Test_AllTests
{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Http');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Http_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Http_AllTests::main') {
- Horde_Http_AllTests::main();
+ Horde_Http_AllTests::main('Horde_Http', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Injector_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
-class Horde_Injector_AllTests
+/**
+ * @package Horde_Injector
+ * @subpackage UnitTests
+ */
+class Horde_Injector_AllTests extends Horde_Test_AllTests
{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Injector');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Injector_' . $class);
- }
- }
-
- return $suite;
- }
}
if (PHPUnit_MAIN_METHOD == 'Horde_Injector_AllTests::main') {
- Horde_Injector_AllTests::main();
+ Horde_Injector_AllTests::main('Horde_Injector', __FILE__);
}
}
/**
- * The Autoloader allows us to omit "require/include" statements.
+ * Prepare the test setup.
*/
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2007-2009 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 Kolab
- * @package Kolab_Format
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_Format
+ * @package Horde_Kolab_Format
+ * @subpackage UnitTests
*/
-class Horde_Kolab_Format_AllTests
+class Horde_Kolab_Format_AllTests extends Horde_Test_AllTests
{
-
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- // Catch strict standards
- // FIXME: This does not work yet, as we still have a number of
- // static methods in basic Horde libraries that are not
- // declared as such. There are also strict failures for the
- // Horde_Date classes.
- //error_reporting(E_ALL | E_STRICT);
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Kolab_Format');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Kolab_Format_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Kolab_Format_AllTests::main') {
- Horde_Kolab_Format_AllTests::main();
+ Horde_Kolab_Format_AllTests::main('Horde_Kolab_Format', __FILE__);
}
*/
/**
- * Define the main method
+ * Define the main method
*/
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Kolab_FreeBusy_AllTests::main');
}
/**
- * The Autoloader allows us to omit "require/include" statements.
+ * Prepare the test setup.
*/
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2007-2009 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 Kolab
- * @package Kolab_FreeBusy
+ * @package Horde_Kolab_FreeBusy
* @subpackage UnitTests
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_FreeBusy
*/
-class Horde_Kolab_FreeBusy_AllTests
+class Horde_Kolab_FreeBusy_AllTests extends Horde_Test_AllTests
{
-
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- // Catch strict standards
- // FIXME: This does not work yet, as we still have a number of
- // static methods in basic Horde libraries that are not
- // declared as such.
- //error_reporting(E_ALL | E_STRICT);
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Kolab_FreeBusy');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- //@TODO: Fix testing. Working on it...
- continue;
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Kolab_FreeBusy_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Kolab_FreeBusy_AllTests::main') {
- Horde_Kolab_FreeBusy_AllTests::main();
+ Horde_Kolab_FreeBusy_AllTests::main('Horde_Kolab_FreeBusy', __FILE__);
}
/**
* Prepare the test setup.
*/
-require_once dirname(__FILE__) . '/Autoload.php';
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2007-2009 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 Kolab
- * @package Kolab_Server
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_Server
+ * @package Horde_Kolab_Server
+ * @subpackage UnitTests
*/
-class Horde_Kolab_Server_AllTests
+class Horde_Kolab_Server_AllTests extends Horde_Test_AllTests
{
-
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Kolab_Server');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Kolab_Server_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Kolab_Server_AllTests::main') {
- Horde_Kolab_Server_AllTests::main();
+ Horde_Kolab_Server_AllTests::main('Horde_Kolab_Server', __FILE__);
}
/**
* Prepare the test setup.
*/
-require_once dirname(__FILE__) . '/Autoload.php';
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2007-2009 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 Kolab
- * @package Kolab_Session
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_Session
+ * @package Horde_Kolab_Session
+ * @subpackage UnitTests
*/
-class Horde_Kolab_Session_AllTests
+class Horde_Kolab_Session_AllTests extends Horde_Test_AllTests
{
-
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Kolab_Session');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(
- DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname)
- );
- $suite->addTestSuite('Horde_Kolab_Session_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Kolab_Session_AllTests::main') {
- Horde_Kolab_Session_AllTests::main();
+ Horde_Kolab_Session_AllTests::main('Horde_Kolab_Session', __FILE__);
}
*/
/**
- * Define the main method
+ * Define the main method
*/
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Kolab_Storage_AllTests::main');
}
/**
- * The Autoloader allows us to omit "require/include" statements.
+ * Prepare the test setup.
*/
-require_once 'Horde/Autoloader.php';
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2007-2009 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 Kolab
- * @package Kolab_Storage
+ * @package Horde_Kolab_Storage
* @subpackage UnitTests
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Kolab_Storage
*/
-class Horde_Kolab_Storage_AllTests
+class Horde_Kolab_Storage_AllTests extends Horde_Test_AllTests
{
-
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- // Catch strict standards
- // FIXME: This does not work yet, as we still have a number of
- // static methods in basic Horde libraries that are not
- // declared as such.
- //error_reporting(E_ALL | E_STRICT);
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Kolab_Storage');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Kolab_Storage_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Kolab_Storage_AllTests::main') {
- Horde_Kolab_Storage_AllTests::main();
+ Horde_Kolab_Storage_AllTests::main('Horde_Kolab_Storage', __FILE__);
}
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Log_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
/**
- * @category Horde
- * @package Horde_Log
+ * @package Horde_Log
* @subpackage UnitTests
- * @author Mike Naberezny <mike@maintainable.com>
- * @author Chuck Hagenbuch <chuck@horde.org>
- * @license http://opensource.org/licenses/bsd-license.php BSD
*/
-class Horde_Log_AllTests
+class Horde_Log_AllTests extends Horde_Test_AllTests
{
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde_Log');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = 'Horde_Log_' . str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite($class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Log_AllTests::main') {
- Horde_Log_AllTests::main();
+ Horde_Log_AllTests::main('Horde_Log', __FILE__);
}
+<?php
+/**
+ * Horde_Mime test suite
+ *
+ * @author Jan Schneider <jan@horde.org>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @category Horde
+ * @package Horde_Mime
+ * @subpackage UnitTests
+ */
+
+/**
+ * Define the main method
+ */
+if (!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', 'Horde_Mime_AllTests::main');
+}
+
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
+
+/**
+ * @package Horde_Mime
+ * @subpackage UnitTests
+ */
+class Horde_Mime_AllTests extends Horde_Test_AllTests
+{
+}
+
+if (PHPUnit_MAIN_METHOD == 'Horde_Mime_AllTests::main') {
+ Horde_Mime_AllTests::main('Horde_Mime', __FILE__);
+}
<?php
/**
- * All tests for the Horde_Kolab_Session:: package.
+ * All tests for the Horde_Notification package.
*
* PHP version 5
*
* Define the main method
*/
if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Kolab_Session_AllTests::main');
+ define('PHPUnit_MAIN_METHOD', 'Horde_Notification_AllTests::main');
}
/**
* Prepare the test setup.
*/
-require_once dirname(__FILE__) . '/Autoload.php';
+require_once 'Horde/Test/AllTests.php';
/**
- * Combine the tests for this package.
- *
- * Copyright 2007-2009 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 Notification
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Notification
+ * @package Horde_Notification
+ * @subpackage UnitTests
*/
-class Horde_Notification_AllTests
+class Horde_Notification_AllTests extends Horde_Test_AllTests
{
-
- /**
- * Main entry point for running the suite.
- *
- * @return NULL
- */
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- /**
- * Collect the unit tests of this directory into a new suite.
- *
- * @return PHPUnit_Framework_TestSuite The test suite.
- */
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Notification');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(
- DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname)
- );
- $suite->addTestSuite('Horde_Notification_' . $class);
- }
- }
-
- return $suite;
- }
-
}
if (PHPUnit_MAIN_METHOD == 'Horde_Notification_AllTests::main') {
- Horde_Notification_AllTests::main();
+ Horde_Notification_AllTests::main('Horde_Notification', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde::Pdf::AllTests::main');
+ define('PHPUnit_MAIN_METHOD', 'Horde_Pdf_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
/**
- * Horde_Pdf test suite
- *
- * @category Horde
* @package Horde_Pdf
* @subpackage UnitTests
*/
-class Horde_Pdf_AllTests
+class Horde_Pdf_AllTests extends Horde_Test_AllTests
{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Pdf');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = 'Horde_Pdf_' . str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite($class);
- }
- }
-
- return $suite;
- }
-
}
-if (PHPUnit_MAIN_METHOD == 'Horde::Pdf::AllTests::main') {
- Horde_Pdf_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Horde_Pdf_AllTests::main') {
+ Horde_Pdf_AllTests::main('Horde_Pdf', __FILE__);
}
* @package Horde_Routes
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Routes_AllTests::main');
}
-error_reporting(E_ALL | E_STRICT);
-
-$lib = dirname(dirname(dirname(dirname(__FILE__)))) . '/lib/Horde/Routes/';
-require_once "$lib/Utils.php";
-require_once "$lib/Mapper.php";
-require_once "$lib/Route.php";
-require_once "$lib/Exception.php";
-
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
/**
- * @package Horde_Routes
+ * @package Horde_Routes
+ * @subpackage UnitTests
*/
-class Horde_Routes_AllTests
+class Horde_Routes_AllTests extends Horde_Test_AllTests
{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Routes');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(
- new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite($class);
- }
- }
-
- return $suite;
- }
}
if (PHPUnit_MAIN_METHOD == 'Horde_Routes_AllTests::main') {
- Horde_Routes_AllTests::main();
+ Horde_Routes_AllTests::main('Horde_Routes', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Stream_Filter_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
/**
* @package Horde_Stream_Filter
* @subpackage UnitTests
*/
-class Horde_Stream_Filter_AllTests
+class Horde_Stream_Filter_AllTests extends Horde_Test_AllTests
{
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Catch strict standards
- error_reporting(E_ALL | E_STRICT);
-
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Stream_Filter');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Stream_Filter_' . $class);
- }
- }
-
- return $suite;
- }
}
if (PHPUnit_MAIN_METHOD == 'Horde_Stream_Filter_AllTests::main') {
- Horde_Stream_Filter_AllTests::main();
+ Horde_Stream_Filter_AllTests::main('Horde_Stream_Filter', __FILE__);
}
public static function suite()
{
+ // Catch strict standards
+ error_reporting(E_ALL | E_STRICT);
+
// Set up autoload
set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
if (!spl_autoload_functions()) {
<dir name="lib">
<dir name="Horde">
<dir name="Test">
+ <file name="AllTests.php" role="php" />
<file name="Case.php" role="php" />
<file name="Functional.php" role="php" />
</dir> <!-- /lib/Horde/Test -->
</dependencies>
<phprelease>
<filelist>
+ <install name="lib/Horde/Test/AllTests.php" as="Horde/Test/AllTests.php" />
<install name="lib/Horde/Test/Case.php" as="Horde/Test/Case.php" />
<install name="lib/Horde/Test/Functional.php" as="Horde/Test/Functional.php" />
</filelist>
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_Text_Textile_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
/**
- * @category Horde
* @package Horde_Text_Textile
* @subpackage UnitTests
*/
-class Horde_Text_Textile_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Text_Textile');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Text_Textile_' . $class);
- }
- }
-
- return $suite;
- }
-
+class Horde_Text_Textile_AllTests extends Horde_Test_AllTests
+{
}
if (PHPUnit_MAIN_METHOD == 'Horde_Text_Textile_AllTests::main') {
- Horde_Text_Textile_AllTests::main();
+ Horde_Text_Textile_AllTests::main('Horde_Text_Textile', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
define('PHPUnit_MAIN_METHOD', 'Horde_View_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-class Horde_View_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Catch strict standards
- error_reporting(E_ALL | E_STRICT);
-
- // Ensure a default timezone is set.
- date_default_timezone_set('America/New_York');
-
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- // Build the suite
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_View');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_View_' . $class);
- }
- }
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
- return $suite;
- }
+/* Ensure a default timezone is set. */
+date_default_timezone_set('America/New_York');
+/**
+ * @package Horde_View
+ * @subpackage UnitTests
+ */
+class Horde_View_AllTests extends Horde_Test_AllTests
+{
}
if (PHPUnit_MAIN_METHOD == 'Horde_View_AllTests::main') {
- Horde_View_AllTests::main();
+ Horde_View_AllTests::main('Horde_View', __FILE__);
}
define('PHPUnit_MAIN_METHOD', 'Horde_Xml_Element_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
-
-class Horde_Xml_Element_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Xml_Element');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Xml_Element_' . $class);
- }
- }
-
- return $suite;
- }
+require_once 'Horde/Test/AllTests.php';
+/**
+ * @package Horde_Url
+ * @subpackage UnitTests
+ */
+class Horde_Xml_Element_AllTests extends Horde_Test_AllTests
+{
}
if (PHPUnit_MAIN_METHOD == 'Horde_Xml_Element_AllTests::main') {
- Horde_Xml_Element_AllTests::main();
+ Horde_Xml_Element_AllTests::main('Horde_Xml_Element', __FILE__);
}
* @subpackage UnitTests
*/
+/**
+ * Define the main method
+ */
if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Yaml_AllTests::main');
+ define('PHPUnit_MAIN_METHOD', 'Horde_Url_AllTests::main');
}
-require_once 'PHPUnit/Framework.php';
-require_once 'PHPUnit/TextUI/TestRunner.php';
+/**
+ * Prepare the test setup.
+ */
+require_once 'Horde/Test/AllTests.php';
+require_once dirname(__FILE__) . '/Helpers.php';
/**
- * @category Horde
- * @package Horde_Yaml
+ * @package Horde_Url
* @subpackage UnitTests
*/
-class Horde_Yaml_AllTests {
-
- public static function main()
- {
- PHPUnit_TextUI_TestRunner::run(self::suite());
- }
-
- public static function suite()
- {
- // Catch strict standards
- error_reporting(E_ALL | E_STRICT);
-
- // Set up autoload
- set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
- if (!spl_autoload_functions()) {
- spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";'));
- }
-
- // Test helpers
- require_once dirname(__FILE__) . '/Helpers.php';
-
- $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Yaml');
-
- $basedir = dirname(__FILE__);
- $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/');
-
- foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
- if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
- $pathname = $file->getPathname();
- require $pathname;
-
- $class = str_replace(DIRECTORY_SEPARATOR, '_',
- preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
- $suite->addTestSuite('Horde_Yaml_' . $class);
- }
- }
-
- return $suite;
- }
-
+class Horde_Url_AllTests extends Horde_Test_AllTests
+{
}
-if (PHPUnit_MAIN_METHOD == 'Horde_Yaml_AllTests::main') {
- Horde_Yaml_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Horde_Url_AllTests::main') {
+ Horde_Url_AllTests::main('Horde_Url', __FILE__);
}