From 77d150d635c2e3070646762f0a60dd07e58df930 Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel
Date: Wed, 9 Sep 2009 10:57:09 +0200 Subject: [PATCH] CS --- .../test/Horde/Kolab/Storage/AllTests.php | 31 ++++++++++++++++------ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/framework/Kolab_Storage/test/Horde/Kolab/Storage/AllTests.php b/framework/Kolab_Storage/test/Horde/Kolab/Storage/AllTests.php index 11b44d8a0..f9990c98e 100644 --- a/framework/Kolab_Storage/test/Horde/Kolab/Storage/AllTests.php +++ b/framework/Kolab_Storage/test/Horde/Kolab/Storage/AllTests.php @@ -2,8 +2,6 @@ /** * All tests for the Kolab_Storage:: package. * - * $Horde: framework/Kolab_Storage/test/Horde/Kolab/Storage/AllTests.php,v 1.4 2009/01/06 17:49:28 jan Exp $ - * * PHP version 5 * * @category Kolab @@ -21,14 +19,14 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Horde_Kolab_Storage_AllTests::main'); } -require_once 'PHPUnit/Framework/TestSuite.php'; -require_once 'PHPUnit/TextUI/TestRunner.php'; +/** + * The Autoloader allows us to omit "require/include" statements. + */ +require_once 'Horde/Autoloader.php'; /** * Combine the tests for this package. * - * $Horde: framework/Kolab_Storage/test/Horde/Kolab/Storage/AllTests.php,v 1.4 2009/01/06 17:49:28 jan Exp $ - * * Copyright 2007-2009 The Horde Project (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you @@ -41,18 +39,35 @@ require_once 'PHPUnit/TextUI/TestRunner.php'; * @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 +{ + /** + * 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__); + $basedir = dirname(__FILE__); $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/'); foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) { -- 2.11.0