cvs: pear /PHPUnit PHPUnit.php /PHPUnit/PHPUnit Assert.php RepeatedTest.php TestCase.php TestDecorator.php TestFailure.php TestListener.php
TestResult.php TestSuite.php /PHPUnit/PHPUnit/GUI HTML.php SetupDecorator.php

From: Date: Sat, 17 Apr 2004 08:12:07 +0000
Subject: cvs: pear /PHPUnit PHPUnit.php /PHPUnit/PHPUnit Assert.php RepeatedTest.php TestCase.php TestDecorator.php TestFailure.php TestListener.php
TestResult.php TestSuite.php /PHPUnit/PHPUnit/GUI HTML.php SetupDecorator.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-18335@lists.php.net to get a copy of this message
sebastian Sat Apr 17 04:12:07 2004 EDT Modified files: /pear/PHPUnit PHPUnit.php /pear/PHPUnit/PHPUnit Assert.php RepeatedTest.php TestCase.php TestDecorator.php TestFailure.php TestListener.php TestResult.php TestSuite.php /pear/PHPUnit/PHPUnit/GUI HTML.php SetupDecorator.php Log: phpDocumentor-related fixes. No functional changes.

http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit.php?r1=1.11&r2=1.12&ty=u Index: pear/PHPUnit/PHPUnit.php diff -u pear/PHPUnit/PHPUnit.php:1.11 pear/PHPUnit/PHPUnit.php:1.12 --- pear/PHPUnit/PHPUnit.php:1.11 Wed Apr 14 11:37:04 2004 +++ pear/PHPUnit/PHPUnit.php Sat Apr 17 04:12:05 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: PHPUnit.php,v 1.11 2004/04/14 15:37:04 sebastian Exp $ +// $Id: PHPUnit.php,v 1.12 2004/04/17 08:12:05 sebastian Exp $ // require_once 'PHPUnit/TestCase.php'; @@ -24,10 +24,11 @@ * * Here is an example: * - * <?php - * require_once 'PHPUnit.php'; + * <code> + * <?php + * require_once 'PHPUnit.php'; * - * class MathTest extends PHPUnit_TestCase { + * class MathTest extends PHPUnit_TestCase { * var $fValue1; * var $fValue2; * @@ -43,26 +44,33 @@ * function testAdd() { * $this->assertTrue($this->fValue1 + $this->fValue2 == 5); * } - * } + * } * - * $suite = new PHPUnit_TestSuite(); - * $suite->addTest(new MathTest('testAdd')); + * $suite = new PHPUnit_TestSuite(); + * $suite->addTest(new MathTest('testAdd')); * - * $result = PHPUnit::run($suite); - * echo $result->toHTML(); - * ?> - * - * Alternatively, you can pass a class name to the - * PHPUnit_TestSuite() constructor and let it automatically add all - * methods of that class that start with 'test' to the suite: - * - * $suite = new PHPUnit_TestSuite('MathTest'); - * $result = PHPUnit::run($suite); - * echo $result->toHTML(); - * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * $result = PHPUnit::run($suite); + * print $result->toHTML(); + * ?> + * </code> + * + * Alternatively, you can pass a class name to the PHPUnit_TestSuite() + * constructor and let it automatically add all methods of that class + * that start with 'test' to the suite: + * + * <code> + * <?php + * $suite = new PHPUnit_TestSuite('MathTest'); + * $result = PHPUnit::run($suite); + * print $result->toHTML(); + * ?> + * </code> + * + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit { function &run(&$suite) { http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/Assert.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit/PHPUnit/Assert.php diff -u pear/PHPUnit/PHPUnit/Assert.php:1.12 pear/PHPUnit/PHPUnit/Assert.php:1.13 --- pear/PHPUnit/PHPUnit/Assert.php:1.12 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/Assert.php Sat Apr 17 04:12:06 2004 @@ -12,15 +12,17 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Assert.php,v 1.12 2004/04/14 15:37:05 sebastian Exp $ +// $Id: Assert.php,v 1.13 2004/04/17 08:12:06 sebastian Exp $ // /** * A set of assert methods. * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_Assert { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/RepeatedTest.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit/PHPUnit/RepeatedTest.php diff -u pear/PHPUnit/PHPUnit/RepeatedTest.php:1.6 pear/PHPUnit/PHPUnit/RepeatedTest.php:1.7 --- pear/PHPUnit/PHPUnit/RepeatedTest.php:1.6 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/RepeatedTest.php Sat Apr 17 04:12:06 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: RepeatedTest.php,v 1.6 2004/04/14 15:37:05 sebastian Exp $ +// $Id: RepeatedTest.php,v 1.7 2004/04/17 08:12:06 sebastian Exp $ // require_once 'PHPUnit/TestDecorator.php'; @@ -22,43 +22,48 @@ * * Here is an example: * - * <?php - * require_once 'PHPUnit.php'; - * require_once 'PHPUnit/RepeatedTest.php'; + * <code> + * <?php + * require_once 'PHPUnit.php'; + * require_once 'PHPUnit/RepeatedTest.php'; * - * class MathTest extends PHPUnit_TestCase { + * class MathTest extends PHPUnit_TestCase { * var $fValue1; * var $fValue2; * * function MathTest($name) { - * $this->PHPUnit_TestCase($name); + * $this->PHPUnit_TestCase($name); * } * * function setUp() { - * $this->fValue1 = 2; - * $this->fValue2 = 3; + * $this->fValue1 = 2; + * $this->fValue2 = 3; * } * * function testAdd() { - * $this->assertTrue($this->fValue1 + $this->fValue2 == 5); + * $this->assertTrue($this->fValue1 + $this->fValue2 == 5); * } - * } + * } * - * $suite = new PHPUnit_TestSuite; - * $suite->addTest( - * new PHPUnit_RepeatedTest( - * new MathTest('testAdd'), - * 10 - * ) - * ); - * - * $result = PHPUnit::run($suite); - * echo $result->toString(); - * ?> - * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * $suite = new PHPUnit_TestSuite; + * + * $suite->addTest( + * new PHPUnit_RepeatedTest( + * new MathTest('testAdd'), + * 10 + * ) + * ); + * + * $result = PHPUnit::run($suite); + * print $result->toString(); + * ?> + * </code> + * + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_RepeatedTest extends PHPUnit_TestDecorator { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/TestCase.php?r1=1.11&r2=1.12&ty=u Index: pear/PHPUnit/PHPUnit/TestCase.php diff -u pear/PHPUnit/PHPUnit/TestCase.php:1.11 pear/PHPUnit/PHPUnit/TestCase.php:1.12 --- pear/PHPUnit/PHPUnit/TestCase.php:1.11 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/TestCase.php Sat Apr 17 04:12:06 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestCase.php,v 1.11 2004/04/14 15:37:05 sebastian Exp $ +// $Id: TestCase.php,v 1.12 2004/04/17 08:12:06 sebastian Exp $ // require_once 'PHPUnit/Assert.php'; @@ -33,31 +33,41 @@ * * Here is an example: * - * class MathTest extends PHPUnit_TestCase { + * <code> + * <?php + * class MathTest extends PHPUnit_TestCase { * var $fValue1; * var $fValue2; * * function MathTest($name) { - * $this->PHPUnit_TestCase($name); + * $this->PHPUnit_TestCase($name); * } * * function setUp() { - * $this->fValue1 = 2; - * $this->fValue2 = 3; + * $this->fValue1 = 2; + * $this->fValue2 = 3; * } - * } + * } + * ?> + * </code> * * For each test implement a method which interacts with the fixture. * Verify the expected results with assertions specified by calling * assert with a boolean. * - * function testPass() { + * <code> + * <?php + * function testPass() { * $this->assertTrue($this->fValue1 + $this->fValue2 == 5); - * } - * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * } + * ?> + * </code> + * + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_TestCase extends PHPUnit_Assert { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/TestDecorator.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit/PHPUnit/TestDecorator.php diff -u pear/PHPUnit/PHPUnit/TestDecorator.php:1.6 pear/PHPUnit/PHPUnit/TestDecorator.php:1.7 --- pear/PHPUnit/PHPUnit/TestDecorator.php:1.6 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/TestDecorator.php Sat Apr 17 04:12:06 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestDecorator.php,v 1.6 2004/04/14 15:37:05 sebastian Exp $ +// $Id: TestDecorator.php,v 1.7 2004/04/17 08:12:06 sebastian Exp $ // require_once 'PHPUnit/TestCase.php'; @@ -25,9 +25,11 @@ * test decorators. Test decorator subclasses can be introduced * to add behaviour before or after a test is run. * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_TestDecorator { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/TestFailure.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit/PHPUnit/TestFailure.php diff -u pear/PHPUnit/PHPUnit/TestFailure.php:1.6 pear/PHPUnit/PHPUnit/TestFailure.php:1.7 --- pear/PHPUnit/PHPUnit/TestFailure.php:1.6 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/TestFailure.php Sat Apr 17 04:12:06 2004 @@ -12,15 +12,17 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestFailure.php,v 1.6 2004/04/14 15:37:05 sebastian Exp $ +// $Id: TestFailure.php,v 1.7 2004/04/17 08:12:06 sebastian Exp $ // /** * A TestFailure collects a failed test together with the caught exception. * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_TestFailure { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/TestListener.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit/PHPUnit/TestListener.php diff -u pear/PHPUnit/PHPUnit/TestListener.php:1.6 pear/PHPUnit/PHPUnit/TestListener.php:1.7 --- pear/PHPUnit/PHPUnit/TestListener.php:1.6 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/TestListener.php Sat Apr 17 04:12:06 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestListener.php,v 1.6 2004/04/14 15:37:05 sebastian Exp $ +// $Id: TestListener.php,v 1.7 2004/04/17 08:12:06 sebastian Exp $ // /** @@ -20,59 +20,63 @@ * * Here is an example: * - * <?php - * require_once 'PHPUnit.php'; - * require_once 'PHPUnit/TestListener.php'; + * <code> + * <?php + * require_once 'PHPUnit.php'; + * require_once 'PHPUnit/TestListener.php'; * - * class MathTest extends PHPUnit_TestCase { + * class MathTest extends PHPUnit_TestCase { * var $fValue1; * var $fValue2; * * function MathTest($name) { - * $this->PHPUnit_TestCase($name); + * $this->PHPUnit_TestCase($name); * } * * function setUp() { - * $this->fValue1 = 2; - * $this->fValue2 = 3; + * $this->fValue1 = 2; + * $this->fValue2 = 3; * } * * function testAdd() { - * $this->assertTrue($this->fValue1 + $this->fValue2 == 4); + * $this->assertTrue($this->fValue1 + $this->fValue2 == 4); * } - * } + * } * - * class MyListener extends PHPUnit_TestListener { + * class MyListener extends PHPUnit_TestListener { * function addError(&$test, &$t) { - * echo "MyListener::addError() called.\n"; + * print "MyListener::addError() called.\n"; * } * * function addFailure(&$test, &$t) { - * echo "MyListener::addFailure() called.\n"; + * print "MyListener::addFailure() called.\n"; * } * * function endTest(&$test) { - * echo "MyListener::endTest() called.\n"; + * print "MyListener::endTest() called.\n"; * } * * function startTest(&$test) { - * echo "MyListener::startTest() called.\n"; + * print "MyListener::startTest() called.\n"; * } - * } + * } * - * $suite = new PHPUnit_TestSuite; - * $suite->addTest(new MathTest('testAdd')); + * $suite = new PHPUnit_TestSuite; + * $suite->addTest(new MathTest('testAdd')); * - * $result = new PHPUnit_TestResult; - * $result->addListener(new MyListener); - * - * $suite->run($result); - * echo $result->toString(); - * ?> - * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * $result = new PHPUnit_TestResult; + * $result->addListener(new MyListener); + * + * $suite->run($result); + * print $result->toString(); + * ?> + * </code> + * + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_TestListener { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/TestResult.php?r1=1.8&r2=1.9&ty=u Index: pear/PHPUnit/PHPUnit/TestResult.php diff -u pear/PHPUnit/PHPUnit/TestResult.php:1.8 pear/PHPUnit/PHPUnit/TestResult.php:1.9 --- pear/PHPUnit/PHPUnit/TestResult.php:1.8 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/TestResult.php Sat Apr 17 04:12:06 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestResult.php,v 1.8 2004/04/14 15:37:05 sebastian Exp $ +// $Id: TestResult.php,v 1.9 2004/04/17 08:12:06 sebastian Exp $ // require_once 'PHPUnit/TestFailure.php'; @@ -21,9 +21,11 @@ /** * A TestResult collects the results of executing a test case. * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_TestResult { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/TestSuite.php?r1=1.8&r2=1.9&ty=u Index: pear/PHPUnit/PHPUnit/TestSuite.php diff -u pear/PHPUnit/PHPUnit/TestSuite.php:1.8 pear/PHPUnit/PHPUnit/TestSuite.php:1.9 --- pear/PHPUnit/PHPUnit/TestSuite.php:1.8 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/TestSuite.php Sat Apr 17 04:12:07 2004 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestSuite.php,v 1.8 2004/04/14 15:37:05 sebastian Exp $ +// $Id: TestSuite.php,v 1.9 2004/04/17 08:12:07 sebastian Exp $ // require_once 'PHPUnit/TestCase.php'; @@ -22,21 +22,31 @@ * * Here is an example using the dynamic test definition. * - * $suite = new PHPUnit_TestSuite(); - * $suite->addTest(new MathTest('testPass')); + * <code> + * <?php + * $suite = new PHPUnit_TestSuite(); + * $suite->addTest(new MathTest('testPass')); + * ?> + * </code> * * Alternatively, a TestSuite can extract the tests to be run automatically. * To do so you pass the classname of your TestCase class to the TestSuite * constructor. * - * $suite = new TestSuite('classname'); + * <code> + * <?php + * $suite = new TestSuite('classname'); + * ?> + * </code> * * This constructor creates a suite with all the methods starting with * "test" that take no arguments. * - * @package PHPUnit - * @author Sebastian Bergmann <sb@sebastian-bergmann.de> - * Based upon JUnit, see http://www.junit.org/ for details. + * @author Sebastian Bergmann <sb@sebastian-bergmann.de> + * @copyright Copyright &copy; 2002-2004 Sebastian Bergmann <sb@sebastian-bergmann.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit */ class PHPUnit_TestSuite { /** http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/GUI/HTML.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit/PHPUnit/GUI/HTML.php diff -u pear/PHPUnit/PHPUnit/GUI/HTML.php:1.10 pear/PHPUnit/PHPUnit/GUI/HTML.php:1.11 --- pear/PHPUnit/PHPUnit/GUI/HTML.php:1.10 Sat Apr 17 02:01:32 2004 +++ pear/PHPUnit/PHPUnit/GUI/HTML.php Sat Apr 17 04:12:07 2004 @@ -12,15 +12,18 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: HTML.php,v 1.10 2004/04/17 06:01:32 sebastian Exp $ +// $Id: HTML.php,v 1.11 2004/04/17 08:12:07 sebastian Exp $ // /** -* This class provides a HTML GUI. -* -* @author Wolfram Kriesing <wolfram@kriesing.de> -* -*/ + * This class provides a HTML GUI. + * + * @author Wolfram Kriesing <wolfram@kriesing.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit + * @subpackage GUI + */ class PHPUnit_GUI_HTML { http://cvs.php.net/diff.php/pear/PHPUnit/PHPUnit/GUI/SetupDecorator.php?r1=1.5&r2=1.6&ty=u Index: pear/PHPUnit/PHPUnit/GUI/SetupDecorator.php diff -u pear/PHPUnit/PHPUnit/GUI/SetupDecorator.php:1.5 pear/PHPUnit/PHPUnit/GUI/SetupDecorator.php:1.6 --- pear/PHPUnit/PHPUnit/GUI/SetupDecorator.php:1.5 Wed Apr 14 11:37:05 2004 +++ pear/PHPUnit/PHPUnit/GUI/SetupDecorator.php Sat Apr 17 04:12:07 2004 @@ -12,32 +12,44 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: SetupDecorator.php,v 1.5 2004/04/14 15:37:05 sebastian Exp $ +// $Id: SetupDecorator.php,v 1.6 2004/04/17 08:12:07 sebastian Exp $ // /** -* This decorator actually just adds the functionality to read the -* test-suite classes from a given directory and instanciate them -* automatically, use it as given in the example below. -* -* usage example -* <code> -* $gui = new PHPUnit_GUI_SetupDecorator(new PHPUnit_GUI_HTML()); -* $gui->getSuitesFromDir('/path/to/dir/tests','.*\.php$',array('index.php','sql.php')); -* $gui->show(); -* </code> -* The example calls this class and tells it to: -* find all file under the directory /path/to/dir/tests -* for files, which end with '.php' (this is a piece of a regexp, that's why the . is escaped) -* and to exclude the files 'index.php' and 'sql.php' -* and include all the files that are left in the tests. -* Given that the path (the first parameter) ends with 'tests' it will be assumed -* that the classes are named tests_* where * is the directory plus the filename, -* according to PEAR standards. -* So that: -* 'testMe.php' in the dir 'tests' bill be assumed to contain a class tests_testMe -* '/moretests/aTest.php' should contain a class 'tests_moretests_aTest' -*/ + * This decorator actually just adds the functionality to read the + * test-suite classes from a given directory and instanciate them + * automatically, use it as given in the example below. + * + * <code> + * <?php + * $gui = new PHPUnit_GUI_SetupDecorator(new PHPUnit_GUI_HTML()); + * $gui->getSuitesFromDir('/path/to/dir/tests','.*\.php$',array('index.php','sql.php')); + * $gui->show(); + * ?> + * </code> + * + * The example calls this class and tells it to: + * + * - find all file under the directory /path/to/dir/tests + * - for files, which end with '.php' (this is a piece of a regexp, that's why the . is escaped) + * - and to exclude the files 'index.php' and 'sql.php' + * - and include all the files that are left in the tests. + * + * Given that the path (the first parameter) ends with 'tests' it will be assumed + * that the classes are named tests_* where * is the directory plus the filename, + * according to PEAR standards. + * + * So that: + * + * - 'testMe.php' in the dir 'tests' bill be assumed to contain a class tests_testMe + * - '/moretests/aTest.php' should contain a class 'tests_moretests_aTest' + * + * @author Wolfram Kriesing <wolfram@kriesing.de> + * @license http://www.php.net/license/3_0.txt The PHP License, Version 3.0 + * @category PHP + * @package PHPUnit + * @subpackage GUI + */ class PHPUnit_GUI_SetupDecorator { /**
« previous php.pear.cvs (#18335) next »