cvs: pear(ZEND_ENGINE_2) /PHPUnit Assert.php AssertionFailedError.php ExceptionTestCase.php Test.php TestCase.php TestDecorator.php TestFailure.php
TestListener.php TestResult.php TestRunListener.php TestRunner.php TestSuite.php Version.php /PHPUnit/TestDecorator CodeCoverage.php RepeatedTest.php
TestSetup.php /PHPUnit/TestRunner CLI.php
| From: | Sebastian Bergmann | Date: | Fri, 06 Jun 2003 10:02:45 +0000 |
| Subject: | cvs: pear(ZEND_ENGINE_2) /PHPUnit Assert.php AssertionFailedError.php ExceptionTestCase.php Test.php TestCase.php TestDecorator.php TestFailure.php TestListener.php TestResult.php TestRunListener.php TestRunner.php TestSuite.php Version.php /PHPUnit/TestDecorator CodeCoverage.php RepeatedTest.php TestSetup.php /PHPUnit/TestRunner CLI.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10725@lists.php.net to get a copy of this message | ||
sebastian Fri Jun 6 06:02:45 2003 EDT
Modified files: (Branch: ZEND_ENGINE_2)
/pear/PHPUnit Assert.php AssertionFailedError.php
ExceptionTestCase.php Test.php TestCase.php
TestDecorator.php TestFailure.php TestListener.php
TestResult.php TestRunListener.php TestRunner.php
TestSuite.php Version.php
/pear/PHPUnit/TestDecorator CodeCoverage.php RepeatedTest.php
TestSetup.php
/pear/PHPUnit/TestRunner CLI.php
Log:
Cleanup.
Index: pear/PHPUnit/Assert.php diff -u pear/PHPUnit/Assert.php:1.1.2.10 pear/PHPUnit/Assert.php:1.1.2.11 --- pear/PHPUnit/Assert.php:1.1.2.10 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/Assert.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Assert.php,v 1.1.2.10 2003/06/02 15:33:27 sebastian Exp $ +// $Id: Assert.php,v 1.1.2.11 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -24,7 +24,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_Assert { +class PHPUnit_Assert { // {{{ Static Members /** @@ -314,12 +314,12 @@ * Fails a test with the given message. * * @param string $message - * @throws PEAR_PHPUnit_AssertionFailedError + * @throws PHPUnit_AssertionFailedError * @access public * @static */ public static function fail($message) { - throw new PEAR_PHPUnit_AssertionFailedError($message); + throw new PHPUnit_AssertionFailedError($message); } // }}} Index: pear/PHPUnit/AssertionFailedError.php diff -u pear/PHPUnit/AssertionFailedError.php:1.1.2.6 pear/PHPUnit/AssertionFailedError.php:1.1.2.7 --- pear/PHPUnit/AssertionFailedError.php:1.1.2.6 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/AssertionFailedError.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: AssertionFailedError.php,v 1.1.2.6 2003/06/02 15:33:27 sebastian Exp $ +// $Id: AssertionFailedError.php,v 1.1.2.7 2003/06/06 10:02:45 sebastian Exp $ // /** @@ -22,7 +22,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_AssertionFailedError extends Exception {} +class PHPUnit_AssertionFailedError extends Exception {} /* * vim600: et sw=2 ts=2 fdm=marker Index: pear/PHPUnit/ExceptionTestCase.php diff -u pear/PHPUnit/ExceptionTestCase.php:1.1.2.4 pear/PHPUnit/ExceptionTestCase.php:1.1.2.5 --- pear/PHPUnit/ExceptionTestCase.php:1.1.2.4 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/ExceptionTestCase.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: ExceptionTestCase.php,v 1.1.2.4 2003/06/02 15:33:27 sebastian Exp $ +// $Id: ExceptionTestCase.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestCase.php'; @@ -25,7 +25,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_ExceptionTestCase extends PEAR_PHPUnit_TestCase { +class PHPUnit_ExceptionTestCase extends PHPUnit_TestCase { // {{{ Members /** Index: pear/PHPUnit/Test.php diff -u pear/PHPUnit/Test.php:1.1.2.4 pear/PHPUnit/Test.php:1.1.2.5 --- pear/PHPUnit/Test.php:1.1.2.4 Mon Jun 2 12:40:47 2003 +++ pear/PHPUnit/Test.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Test.php,v 1.1.2.4 2003/06/02 16:40:47 sebastian Exp $ +// $Id: Test.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // /** @@ -22,7 +22,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -interface PEAR_PHPUnit_Test { +interface PHPUnit_Test { // {{{ public function countTestCases() /** @@ -34,16 +34,16 @@ public function countTestCases(); // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs a test and collects its result in a TestResult instance. * - * @param PEAR_PHPUnit_TestResult $result - * @return PEAR_PHPUnit_TestResult + * @param PHPUnit_TestResult $result + * @return PHPUnit_TestResult * @access public */ - public function run(PEAR_PHPUnit_TestResult $result); + public function run(PHPUnit_TestResult $result); // }}} } Index: pear/PHPUnit/TestCase.php diff -u pear/PHPUnit/TestCase.php:1.1.2.7 pear/PHPUnit/TestCase.php:1.1.2.8 --- pear/PHPUnit/TestCase.php:1.1.2.7 Mon Jun 2 12:55:09 2003 +++ pear/PHPUnit/TestCase.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestCase.php,v 1.1.2.7 2003/06/02 16:55:09 sebastian Exp $ +// $Id: TestCase.php,v 1.1.2.8 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Assert.php'; @@ -34,7 +34,7 @@ * * Here is an example: * - * class MathTest extends PEAR_PHPUnit_TestCase { + * class MathTest extends PHPUnit_TestCase { * public $fValue1; * public $fValue2; * @@ -60,7 +60,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestCase extends PEAR_PHPUnit_Assert implements PEAR_PHPUnit_Test { +class PHPUnit_TestCase extends PHPUnit_Assert implements PHPUnit_Test { // {{{ Members /** @@ -72,9 +72,9 @@ private $name = ''; /** - * PEAR_PHPUnit_TestResult object + * PHPUnit_TestResult object * - * @var PEAR_PHPUnit_TestResult + * @var PHPUnit_TestResult * @access private */ private $result; @@ -121,16 +121,16 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the test case and collects the results in a given TestResult object. * - * @param PEAR_PHPUnit_TestResult $result - * @return PEAR_PHPUnit_TestResult + * @param PHPUnit_TestResult $result + * @return PHPUnit_TestResult * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { $this->result = $result; $this->result->run($this); @@ -154,7 +154,7 @@ $this->runTest(); } - catch (PEAR_PHPUnit_AssertionFailedError $e) { + catch (PHPUnit_AssertionFailedError $e) { $this->result->addFailure($this, $e); $failed = true; } @@ -223,11 +223,11 @@ /** * Creates a default TestResult object. * - * @return PEAR_PHPUnit_TestResult + * @return PHPUnit_TestResult * @access protected */ protected function createResult() { - return new PEAR_PHPUnit_TestResult; + return new PHPUnit_TestResult; } // }}} Index: pear/PHPUnit/TestDecorator.php diff -u pear/PHPUnit/TestDecorator.php:1.1.2.4 pear/PHPUnit/TestDecorator.php:1.1.2.5 --- pear/PHPUnit/TestDecorator.php:1.1.2.4 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator.php Fri Jun 6 06:02:45 2003 @@ -12,12 +12,11 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestDecorator.php,v 1.1.2.4 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestDecorator.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // +require_once 'PHPUnit/Assert.php'; require_once 'PHPUnit/Test.php'; -require_once 'PHPUnit/TestCase.php'; -require_once 'PHPUnit/TestSuite.php'; /** * A Decorator for Tests. @@ -30,7 +29,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator extends PEAR_PHPUnit_Assert implements PEAR_PHPUnit_Test { +class PHPUnit_TestDecorator extends PHPUnit_Assert implements PHPUnit_Test { // {{{ Members /** @@ -42,29 +41,29 @@ protected $test = null; // }}} - // {{{ public function __construct(PEAR_PHPUnit_Test $test) + // {{{ public function __construct(PHPUnit_Test $test) /** * Constructor. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function __construct(PEAR_PHPUnit_Test $test) { + public function __construct(PHPUnit_Test $test) { $this->test = $test; } // }}} - // {{{ public function basicRun(PEAR_PHPUnit_TestResult $result) + // {{{ public function basicRun(PHPUnit_TestResult $result) /** * Runs the test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function basicRun(PEAR_PHPUnit_TestResult $result) { + public function basicRun(PHPUnit_TestResult $result) { $this->test->run($result); } @@ -88,7 +87,7 @@ /** * Returns the test to be run. * - * @return PEAR_PHPUnit_Test + * @return PHPUnit_Test * @access public */ public function getTest() { @@ -96,16 +95,16 @@ } // }}} - // {{{ protected function run(PEAR_PHPUnit_TestResult $result) + // {{{ protected function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { $this->basicRun($result); } Index: pear/PHPUnit/TestFailure.php diff -u pear/PHPUnit/TestFailure.php:1.1.2.5 pear/PHPUnit/TestFailure.php:1.1.2.6 --- pear/PHPUnit/TestFailure.php:1.1.2.5 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestFailure.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestFailure.php,v 1.1.2.5 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestFailure.php,v 1.1.2.6 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Test.php'; @@ -24,7 +24,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestFailure { +class PHPUnit_TestFailure { // {{{ Members /** @@ -40,16 +40,16 @@ private $thrownException; // }}} - // {{{ public function __construct(PEAR_PHPUnit_Test $failedTest, Exception $thrownException) + // {{{ public function __construct(PHPUnit_Test $failedTest, Exception $thrownException) /** * Constructs a TestFailure with the given test and exception. * - * @param PEAR_PHPUnit_Test $failedTest + * @param PHPUnit_Test $failedTest * @param Exception $thrownException * @access public */ - public function __construct(PEAR_PHPUnit_Test $failedTest, Exception $thrownException) { + public function __construct(PHPUnit_Test $failedTest, Exception $thrownException) { $this->failedTest = $failedTest; $this->thrownException = $thrownException; } @@ -123,7 +123,7 @@ * @access public */ public function isFailure() { - return ($this->thrownException instanceof PEAR_PHPUnit_AssertionFailedError); + return ($this->thrownException instanceof PHPUnit_AssertionFailedError); } // }}} Index: pear/PHPUnit/TestListener.php diff -u pear/PHPUnit/TestListener.php:1.1.2.6 pear/PHPUnit/TestListener.php:1.1.2.7 --- pear/PHPUnit/TestListener.php:1.1.2.6 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestListener.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestListener.php,v 1.1.2.6 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestListener.php,v 1.1.2.7 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -25,51 +25,51 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -interface PEAR_PHPUnit_TestListener { - // {{{ public function addError(PEAR_PHPUnit_Test $test, Exception $e) +interface PHPUnit_TestListener { + // {{{ public function addError(PHPUnit_Test $test, Exception $e) /** * An error occurred. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param Exception $e * @access public */ - public function addError(PEAR_PHPUnit_Test $test, Exception $e); + public function addError(PHPUnit_Test $test, Exception $e); // }}} - // {{{ public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A failure occurred. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public */ - public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e); + public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e); // }}} - // {{{ public function endTest(PEAR_PHPUnit_Test $test) + // {{{ public function endTest(PHPUnit_Test $test) /** * A test ended. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function endTest(PEAR_PHPUnit_Test $test); + public function endTest(PHPUnit_Test $test); // }}} - // {{{ public function startTest(PEAR_PHPUnit_Test $test) + // {{{ public function startTest(PHPUnit_Test $test) /** * A test started. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function startTest(PEAR_PHPUnit_Test $test); + public function startTest(PHPUnit_Test $test); // }}} } Index: pear/PHPUnit/TestResult.php diff -u pear/PHPUnit/TestResult.php:1.1.2.7 pear/PHPUnit/TestResult.php:1.1.2.8 --- pear/PHPUnit/TestResult.php:1.1.2.7 Wed Jun 4 05:43:30 2003 +++ pear/PHPUnit/TestResult.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestResult.php,v 1.1.2.7 2003/06/04 09:43:30 sebastian Exp $ +// $Id: TestResult.php,v 1.1.2.8 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -27,7 +27,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestResult { +class PHPUnit_TestResult { // {{{ Members /** @@ -67,18 +67,18 @@ private $stop = false; // }}} - // {{{ public function addError(PEAR_PHPUnit_Test $test, Exception $e) + // {{{ public function addError(PHPUnit_Test $test, Exception $e) /** * Adds an error to the list of errors. * The passed in exception caused the error. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param Exception $e * @access public */ - public function addError(PEAR_PHPUnit_Test $test, Exception $e) { - $this->errors[] = new PEAR_PHPUnit_TestFailure($test, $e); + public function addError(PHPUnit_Test $test, Exception $e) { + $this->errors[] = new PHPUnit_TestFailure($test, $e); for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->addError($test, $e); @@ -86,18 +86,18 @@ } // }}} - // {{{ public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * Adds a failure to the list of failures. * The passed in exception caused the failure. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public */ - public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) { - $this->failures[] = new PEAR_PHPUnit_TestFailure($test, $e); + public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) { + $this->failures[] = new PHPUnit_TestFailure($test, $e); for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->addFailure($test, $e); @@ -105,41 +105,41 @@ } // }}} - // {{{ public function addListener(PEAR_PHPUnit_TestListener $listener) + // {{{ public function addListener(PHPUnit_TestListener $listener) /** * Registers a TestListener. * - * @param PEAR_PHPUnit_TestListener + * @param PHPUnit_TestListener * @access public */ - public function addListener(PEAR_PHPUnit_TestListener $listener) { + public function addListener(PHPUnit_TestListener $listener) { $this->listeners[] = $listener; } // }}} - // {{{ public function addPassedTest(PEAR_PHPUnit_Test $test) + // {{{ public function addPassedTest(PHPUnit_Test $test) /** * Adds a passed test to the list of passed tests. * - * @param PEAR_PHPUnit_Test + * @param PHPUnit_Test * @access public */ - public function addPassedTest(PEAR_PHPUnit_Test $test) { + public function addPassedTest(PHPUnit_Test $test) { $this->passedTests[] = $test; } // }}} - // {{{ public function endTest(PEAR_PHPUnit_Test $test) + // {{{ public function endTest(PHPUnit_Test $test) /** * Informs the result that a test was completed. * - * @param PEAR_PHPUnit_Test + * @param PHPUnit_Test * @access public */ - public function endTest(PEAR_PHPUnit_Test $test) { + public function endTest(PHPUnit_Test $test) { for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->endTest($test); } @@ -211,15 +211,15 @@ } // }}} - // {{{ public function removeListener(PEAR_PHPUnit_TestListener $listener) + // {{{ public function removeListener(PHPUnit_TestListener $listener) /** * Unregisters a TestListener. * - * @param PEAR_PHPUnit_TestListener $listener + * @param PHPUnit_TestListener $listener * @access public */ - public function removeListener(PEAR_PHPUnit_TestListener $listener) { + public function removeListener(PHPUnit_TestListener $listener) { for ($i = 0; $i < sizeof($this->listeners); $i++) { if ($this->listeners[$i] === $listener) { unset($this->listeners[$i]); @@ -228,15 +228,15 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_Test $test) + // {{{ public function run(PHPUnit_Test $test) /** * Runs a TestCase. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function run(PEAR_PHPUnit_Test $test) { + public function run(PHPUnit_Test $test) { $this->startTest($test); $this->runTests++; $test->runBare(); @@ -269,15 +269,15 @@ } // }}} - // {{{ public function startTest(PEAR_PHPUnit_Test $test) + // {{{ public function startTest(PHPUnit_Test $test) /** * Informs the result that a test will be started. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function startTest(PEAR_PHPUnit_Test $test) { + public function startTest(PHPUnit_Test $test) { for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->startTest($test); } Index: pear/PHPUnit/TestRunListener.php diff -u pear/PHPUnit/TestRunListener.php:1.1.2.3 pear/PHPUnit/TestRunListener.php:1.1.2.4 --- pear/PHPUnit/TestRunListener.php:1.1.2.3 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestRunListener.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestRunListener.php,v 1.1.2.3 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestRunListener.php,v 1.1.2.4 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Test.php'; @@ -27,7 +27,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -interface PEAR_PHPUnit_TestRunListener { +interface PHPUnit_TestRunListener { const STATUS_ERROR = 1; const STATUS_FAILURE = 2; Index: pear/PHPUnit/TestRunner.php diff -u pear/PHPUnit/TestRunner.php:1.1.2.11 pear/PHPUnit/TestRunner.php:1.1.2.12 --- pear/PHPUnit/TestRunner.php:1.1.2.11 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestRunner.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestRunner.php,v 1.1.2.11 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestRunner.php,v 1.1.2.12 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -27,44 +27,44 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -abstract class PEAR_PHPUnit_TestRunner implements PEAR_PHPUnit_TestListener { - // {{{ public function addError(PEAR_PHPUnit_Test $test, Exception $e) +abstract class PHPUnit_TestRunner implements PHPUnit_TestListener { + // {{{ public function addError(PHPUnit_Test $test, Exception $e) /** * An error occurred. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param Exception $e * @access public */ - public function addError(PEAR_PHPUnit_Test $test, Exception $e) { - $this->testFailed(PEAR_PHPUnit_TestRunListener::STATUS_ERROR, $test, $e); + public function addError(PHPUnit_Test $test, Exception $e) { + $this->testFailed(PHPUnit_TestRunListener::STATUS_ERROR, $test, $e); } // }}} - // {{{ public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A failure occurred. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public */ - public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) { - $this->testFailed(PEAR_PHPUnit_TestRunListener::STATUS_FAILURE, $test, $e); + public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) { + $this->testFailed(PHPUnit_TestRunListener::STATUS_FAILURE, $test, $e); } // }}} - // {{{ public function endTest(PEAR_PHPUnit_Test $test) + // {{{ public function endTest(PHPUnit_Test $test) /** * A test ended. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function endTest(PEAR_PHPUnit_Test $test) { + public function endTest(PHPUnit_Test $test) { $this->testEnded($test->getName()); } @@ -77,25 +77,25 @@ * the runFailed() and clearStatus() methods. * * @param string $suiteClassName - * @return PEAR_PHPUnit_Test + * @return PHPUnit_Test * @access public */ public function getTest($suiteClassName) { // XXX: FIX ME: Error Handling include $suiteClassName . '.php'; - return new PEAR_PHPUnit_TestSuite($suiteClassName); + return new PHPUnit_TestSuite($suiteClassName); } // }}} - // {{{ public function startTest(PEAR_PHPUnit_Test $test) + // {{{ public function startTest(PHPUnit_Test $test) /** * A test started. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function startTest(PEAR_PHPUnit_Test $test) { + public function startTest(PHPUnit_Test $test) { $this->testStarted($test->getName()); } @@ -112,18 +112,18 @@ public abstract function testEnded($testName); // }}} - // {{{ public abstract function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public abstract function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A test failed. * * @param integer $status - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public * @abstract */ - public abstract function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e); + public abstract function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e); // }}} // {{{ public abstract function testStarted($testName) Index: pear/PHPUnit/TestSuite.php diff -u pear/PHPUnit/TestSuite.php:1.1.2.3 pear/PHPUnit/TestSuite.php:1.1.2.4 --- pear/PHPUnit/TestSuite.php:1.1.2.3 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestSuite.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestSuite.php,v 1.1.2.3 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestSuite.php,v 1.1.2.4 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Test.php'; @@ -23,14 +23,14 @@ * * Here is an example using the dynamic test definition. * - * $suite = new PEAR_PHPUnit_TestSuite(); + * $suite = new PHPUnit_TestSuite(); * $suite->addTest(new MathTest('testPass')); * * Alternatively, a TestSuite can extract the tests to be run automatically. - * To do so you pass the classname of your PEAR_PHPUnit_TestCase class to - * the PEAR_PHPUnit_TestSuite constructor. + * To do so you pass the classname of your PHPUnit_TestCase class to + * the PHPUnit_TestSuite constructor. * - * $suite = new PEAR_PHPUnit_TestSuite('classname'); + * $suite = new PHPUnit_TestSuite('classname'); * * This constructor creates a suite with all the methods starting with * "test" that take no arguments. @@ -39,7 +39,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestSuite implements PEAR_PHPUnit_Test { +class PHPUnit_TestSuite implements PHPUnit_Test { // {{{ Members /** @@ -75,15 +75,15 @@ } // }}} - // {{{ public function addTest(PEAR_PHPUnit_Test $test) + // {{{ public function addTest(PHPUnit_Test $test) /** * Adds a test to the suite. * - * @param PEAR_PHPUnit_Test + * @param PHPUnit_Test * @access public */ - public function addTest(PEAR_PHPUnit_Test $test) { + public function addTest(PHPUnit_Test $test) { $this->tests[] = $test; } @@ -141,31 +141,31 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the tests and collects their result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { for ($i = 0; $i < sizeof($this->tests) && !$result->shouldStop(); $i++) { $this->tests[$i]->run($result); } } // }}} - // {{{ public function runTest(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_TestResult $result) + // {{{ public function runTest(PHPUnit_Test $test, PHPUnit_TestResult $result) /** * Runs a test. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_TestResult $testResult + * @param PHPUnit_Test $test + * @param PHPUnit_TestResult $testResult * @access public */ - public function runTest(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_TestResult $result) { + public function runTest(PHPUnit_Test $test, PHPUnit_TestResult $result) { $test->run($result); } Index: pear/PHPUnit/Version.php diff -u pear/PHPUnit/Version.php:1.1.2.2 pear/PHPUnit/Version.php:1.1.2.3 --- pear/PHPUnit/Version.php:1.1.2.2 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/Version.php Fri Jun 6 06:02:45 2003 @@ -12,10 +12,10 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Version.php,v 1.1.2.2 2003/06/02 15:33:27 sebastian Exp $ +// $Id: Version.php,v 1.1.2.3 2003/06/06 10:02:45 sebastian Exp $ // -define('PEAR_PHPUnit_Version', '1.0.0-dev'); +define('PHPUnit_Version', '1.0.0-dev'); /* * vim600: et sw=2 ts=2 fdm=marker Index: pear/PHPUnit/TestDecorator/CodeCoverage.php diff -u pear/PHPUnit/TestDecorator/CodeCoverage.php:1.1.2.2 pear/PHPUnit/TestDecorator/CodeCoverage.php:1.1.2.3 --- pear/PHPUnit/TestDecorator/CodeCoverage.php:1.1.2.2 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator/CodeCoverage.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: CodeCoverage.php,v 1.1.2.2 2003/06/02 15:33:27 sebastian Exp $ +// $Id: CodeCoverage.php,v 1.1.2.3 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestDecorator.php'; @@ -24,17 +24,17 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator_CodeCoverage extends PEAR_PHPUnit_TestDecorator { - // {{{ public function run(PEAR_PHPUnit_TestResult $result) +class PHPUnit_TestDecorator_CodeCoverage extends PHPUnit_TestDecorator { + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { xdebug_start_code_coverage(); $this->test->run($result); xdebug_stop_code_coverage(); Index: pear/PHPUnit/TestDecorator/RepeatedTest.php diff -u pear/PHPUnit/TestDecorator/RepeatedTest.php:1.1.2.4 pear/PHPUnit/TestDecorator/RepeatedTest.php:1.1.2.5 --- pear/PHPUnit/TestDecorator/RepeatedTest.php:1.1.2.4 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator/RepeatedTest.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: RepeatedTest.php,v 1.1.2.4 2003/06/02 15:33:27 sebastian Exp $ +// $Id: RepeatedTest.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestDecorator.php'; @@ -24,7 +24,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator_RepeatedTest extends PEAR_PHPUnit_TestDecorator { +class PHPUnit_TestDecorator_RepeatedTest extends PHPUnit_TestDecorator { // {{{ Members /** @@ -34,16 +34,16 @@ private $timesRepeat = 1; // }}} - // {{{ public function __construct(PEAR_PHPUnit_Test $test, $timesRepeat = 1) + // {{{ public function __construct(PHPUnit_Test $test, $timesRepeat = 1) /** * Constructor. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param integer $timesRepeat * @access public */ - public function __construct(PEAR_PHPUnit_Test $test, $timesRepeat = 1) { + public function __construct(PHPUnit_Test $test, $timesRepeat = 1) { parent::__construct($test); $this->timesRepeat = $timesRepeat; } @@ -63,16 +63,16 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { for ($i = 0; $i < $this->timesRepeat && !$result->shouldStop(); $i++) { $this->test->run($result); } Index: pear/PHPUnit/TestDecorator/TestSetup.php diff -u pear/PHPUnit/TestDecorator/TestSetup.php:1.1.2.3 pear/PHPUnit/TestDecorator/TestSetup.php:1.1.2.4 --- pear/PHPUnit/TestDecorator/TestSetup.php:1.1.2.3 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator/TestSetup.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestSetup.php,v 1.1.2.3 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestSetup.php,v 1.1.2.4 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestDecorator.php'; @@ -26,17 +26,17 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator_TestSetup extends PEAR_PHPUnit_TestDecorator { - // {{{ public function run(PEAR_PHPUnit_TestResult $result) +class PHPUnit_TestDecorator_TestSetup extends PHPUnit_TestDecorator { + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { $this->setUp(); $this->basicRun($result); $this->tearDown(); Index: pear/PHPUnit/TestRunner/CLI.php diff -u pear/PHPUnit/TestRunner/CLI.php:1.1.2.19 pear/PHPUnit/TestRunner/CLI.php:1.1.2.20 --- pear/PHPUnit/TestRunner/CLI.php:1.1.2.19 Wed Jun 4 05:52:56 2003 +++ pear/PHPUnit/TestRunner/CLI.php Fri Jun 6 06:02:45 2003 @@ -12,12 +12,11 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: CLI.php,v 1.1.2.19 2003/06/04 09:52:56 sebastian Exp $ +// $Id: CLI.php,v 1.1.2.20 2003/06/06 10:02:45 sebastian Exp $ // require_once 'Benchmark/Timer.php'; require_once 'Console/Getopt.php'; -require_once 'PHPUnit/AssertionFailedError.php'; require_once 'PHPUnit/Test.php'; require_once 'PHPUnit/TestResult.php'; require_once 'PHPUnit/TestRunner.php'; @@ -31,7 +30,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestRunner_CLI extends PEAR_PHPUnit_TestRunner { +class PHPUnit_TestRunner_CLI extends PHPUnit_TestRunner { // {{{ public static function main() /** @@ -41,7 +40,7 @@ printf( "PHPUnit %s by Sebastian Bergmann.\n\n", - PEAR_PHPUnit_Version + PHPUnit_Version ); $options = Console_Getopt::getopt( @@ -59,7 +58,7 @@ $wait = isset($options[0][0][0]) ? true : false; if ($test) { - $testRunner = new PEAR_PHPUnit_TestRunner_CLI; + $testRunner = new PHPUnit_TestRunner_CLI; try { $result = $testRunner->doRun( @@ -81,17 +80,17 @@ } // }}} - // {{{ public function doRun(PEAR_PHPUnit_Test $suite, $wait = false) + // {{{ public function doRun(PHPUnit_Test $suite, $wait = false) /** * Runs a test suite. * - * @param PEAR_PHPUnit_Test $suite + * @param PHPUnit_Test $suite * @param optional boolean $wait */ - public function doRun(PEAR_PHPUnit_Test $suite, $wait = false) { - $result = new PEAR_PHPUnit_TestResult; - $result->addListener(new PEAR_PHPUnit_TestRunner_CLI); + public function doRun(PHPUnit_Test $suite, $wait = false) { + $result = new PHPUnit_TestResult; + $result->addListener(new PHPUnit_TestRunner_CLI); $timer = new Benchmark_Timer; $timer->start(); @@ -119,16 +118,16 @@ public function testEnded($testName) {} // }}} - // {{{ public function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A test failed. * * @param integer $status - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e */ - public function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) {} + public function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) {} // }}} // {{{ public function testStarted($testName) @@ -151,11 +150,11 @@ */ public function printTests($tests) { foreach ($tests as $test) { - if ($test instanceof PEAR_PHPUnit_TestFailure) { + if ($test instanceof PHPUnit_TestFailure) { $exception = $test->thrownException(); $name = $test->failedTest()->getName(); - if ($exception instanceof PEAR_PHPUnit_AssertionFailedError) { + if ($exception instanceof PHPUnit_AssertionFailedError) { $prefix = 'FAIL'; } else { $prefix = 'ERROR'; @@ -190,7 +189,7 @@ // }}} } -PEAR_PHPUnit_TestRunner_CLI::main(); +PHPUnit_TestRunner_CLI::main(); /* * vim600: et sw=2 ts=2 fdm=marker
Index: pear/PHPUnit/Assert.php diff -u pear/PHPUnit/Assert.php:1.1.2.10 pear/PHPUnit/Assert.php:1.1.2.11 --- pear/PHPUnit/Assert.php:1.1.2.10 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/Assert.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Assert.php,v 1.1.2.10 2003/06/02 15:33:27 sebastian Exp $ +// $Id: Assert.php,v 1.1.2.11 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -24,7 +24,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_Assert { +class PHPUnit_Assert { // {{{ Static Members /** @@ -314,12 +314,12 @@ * Fails a test with the given message. * * @param string $message - * @throws PEAR_PHPUnit_AssertionFailedError + * @throws PHPUnit_AssertionFailedError * @access public * @static */ public static function fail($message) { - throw new PEAR_PHPUnit_AssertionFailedError($message); + throw new PHPUnit_AssertionFailedError($message); } // }}} Index: pear/PHPUnit/AssertionFailedError.php diff -u pear/PHPUnit/AssertionFailedError.php:1.1.2.6 pear/PHPUnit/AssertionFailedError.php:1.1.2.7 --- pear/PHPUnit/AssertionFailedError.php:1.1.2.6 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/AssertionFailedError.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: AssertionFailedError.php,v 1.1.2.6 2003/06/02 15:33:27 sebastian Exp $ +// $Id: AssertionFailedError.php,v 1.1.2.7 2003/06/06 10:02:45 sebastian Exp $ // /** @@ -22,7 +22,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_AssertionFailedError extends Exception {} +class PHPUnit_AssertionFailedError extends Exception {} /* * vim600: et sw=2 ts=2 fdm=marker Index: pear/PHPUnit/ExceptionTestCase.php diff -u pear/PHPUnit/ExceptionTestCase.php:1.1.2.4 pear/PHPUnit/ExceptionTestCase.php:1.1.2.5 --- pear/PHPUnit/ExceptionTestCase.php:1.1.2.4 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/ExceptionTestCase.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: ExceptionTestCase.php,v 1.1.2.4 2003/06/02 15:33:27 sebastian Exp $ +// $Id: ExceptionTestCase.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestCase.php'; @@ -25,7 +25,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_ExceptionTestCase extends PEAR_PHPUnit_TestCase { +class PHPUnit_ExceptionTestCase extends PHPUnit_TestCase { // {{{ Members /** Index: pear/PHPUnit/Test.php diff -u pear/PHPUnit/Test.php:1.1.2.4 pear/PHPUnit/Test.php:1.1.2.5 --- pear/PHPUnit/Test.php:1.1.2.4 Mon Jun 2 12:40:47 2003 +++ pear/PHPUnit/Test.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Test.php,v 1.1.2.4 2003/06/02 16:40:47 sebastian Exp $ +// $Id: Test.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // /** @@ -22,7 +22,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -interface PEAR_PHPUnit_Test { +interface PHPUnit_Test { // {{{ public function countTestCases() /** @@ -34,16 +34,16 @@ public function countTestCases(); // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs a test and collects its result in a TestResult instance. * - * @param PEAR_PHPUnit_TestResult $result - * @return PEAR_PHPUnit_TestResult + * @param PHPUnit_TestResult $result + * @return PHPUnit_TestResult * @access public */ - public function run(PEAR_PHPUnit_TestResult $result); + public function run(PHPUnit_TestResult $result); // }}} } Index: pear/PHPUnit/TestCase.php diff -u pear/PHPUnit/TestCase.php:1.1.2.7 pear/PHPUnit/TestCase.php:1.1.2.8 --- pear/PHPUnit/TestCase.php:1.1.2.7 Mon Jun 2 12:55:09 2003 +++ pear/PHPUnit/TestCase.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestCase.php,v 1.1.2.7 2003/06/02 16:55:09 sebastian Exp $ +// $Id: TestCase.php,v 1.1.2.8 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Assert.php'; @@ -34,7 +34,7 @@ * * Here is an example: * - * class MathTest extends PEAR_PHPUnit_TestCase { + * class MathTest extends PHPUnit_TestCase { * public $fValue1; * public $fValue2; * @@ -60,7 +60,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestCase extends PEAR_PHPUnit_Assert implements PEAR_PHPUnit_Test { +class PHPUnit_TestCase extends PHPUnit_Assert implements PHPUnit_Test { // {{{ Members /** @@ -72,9 +72,9 @@ private $name = ''; /** - * PEAR_PHPUnit_TestResult object + * PHPUnit_TestResult object * - * @var PEAR_PHPUnit_TestResult + * @var PHPUnit_TestResult * @access private */ private $result; @@ -121,16 +121,16 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the test case and collects the results in a given TestResult object. * - * @param PEAR_PHPUnit_TestResult $result - * @return PEAR_PHPUnit_TestResult + * @param PHPUnit_TestResult $result + * @return PHPUnit_TestResult * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { $this->result = $result; $this->result->run($this); @@ -154,7 +154,7 @@ $this->runTest(); } - catch (PEAR_PHPUnit_AssertionFailedError $e) { + catch (PHPUnit_AssertionFailedError $e) { $this->result->addFailure($this, $e); $failed = true; } @@ -223,11 +223,11 @@ /** * Creates a default TestResult object. * - * @return PEAR_PHPUnit_TestResult + * @return PHPUnit_TestResult * @access protected */ protected function createResult() { - return new PEAR_PHPUnit_TestResult; + return new PHPUnit_TestResult; } // }}} Index: pear/PHPUnit/TestDecorator.php diff -u pear/PHPUnit/TestDecorator.php:1.1.2.4 pear/PHPUnit/TestDecorator.php:1.1.2.5 --- pear/PHPUnit/TestDecorator.php:1.1.2.4 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator.php Fri Jun 6 06:02:45 2003 @@ -12,12 +12,11 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestDecorator.php,v 1.1.2.4 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestDecorator.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // +require_once 'PHPUnit/Assert.php'; require_once 'PHPUnit/Test.php'; -require_once 'PHPUnit/TestCase.php'; -require_once 'PHPUnit/TestSuite.php'; /** * A Decorator for Tests. @@ -30,7 +29,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator extends PEAR_PHPUnit_Assert implements PEAR_PHPUnit_Test { +class PHPUnit_TestDecorator extends PHPUnit_Assert implements PHPUnit_Test { // {{{ Members /** @@ -42,29 +41,29 @@ protected $test = null; // }}} - // {{{ public function __construct(PEAR_PHPUnit_Test $test) + // {{{ public function __construct(PHPUnit_Test $test) /** * Constructor. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function __construct(PEAR_PHPUnit_Test $test) { + public function __construct(PHPUnit_Test $test) { $this->test = $test; } // }}} - // {{{ public function basicRun(PEAR_PHPUnit_TestResult $result) + // {{{ public function basicRun(PHPUnit_TestResult $result) /** * Runs the test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function basicRun(PEAR_PHPUnit_TestResult $result) { + public function basicRun(PHPUnit_TestResult $result) { $this->test->run($result); } @@ -88,7 +87,7 @@ /** * Returns the test to be run. * - * @return PEAR_PHPUnit_Test + * @return PHPUnit_Test * @access public */ public function getTest() { @@ -96,16 +95,16 @@ } // }}} - // {{{ protected function run(PEAR_PHPUnit_TestResult $result) + // {{{ protected function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { $this->basicRun($result); } Index: pear/PHPUnit/TestFailure.php diff -u pear/PHPUnit/TestFailure.php:1.1.2.5 pear/PHPUnit/TestFailure.php:1.1.2.6 --- pear/PHPUnit/TestFailure.php:1.1.2.5 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestFailure.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestFailure.php,v 1.1.2.5 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestFailure.php,v 1.1.2.6 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Test.php'; @@ -24,7 +24,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestFailure { +class PHPUnit_TestFailure { // {{{ Members /** @@ -40,16 +40,16 @@ private $thrownException; // }}} - // {{{ public function __construct(PEAR_PHPUnit_Test $failedTest, Exception $thrownException) + // {{{ public function __construct(PHPUnit_Test $failedTest, Exception $thrownException) /** * Constructs a TestFailure with the given test and exception. * - * @param PEAR_PHPUnit_Test $failedTest + * @param PHPUnit_Test $failedTest * @param Exception $thrownException * @access public */ - public function __construct(PEAR_PHPUnit_Test $failedTest, Exception $thrownException) { + public function __construct(PHPUnit_Test $failedTest, Exception $thrownException) { $this->failedTest = $failedTest; $this->thrownException = $thrownException; } @@ -123,7 +123,7 @@ * @access public */ public function isFailure() { - return ($this->thrownException instanceof PEAR_PHPUnit_AssertionFailedError); + return ($this->thrownException instanceof PHPUnit_AssertionFailedError); } // }}} Index: pear/PHPUnit/TestListener.php diff -u pear/PHPUnit/TestListener.php:1.1.2.6 pear/PHPUnit/TestListener.php:1.1.2.7 --- pear/PHPUnit/TestListener.php:1.1.2.6 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestListener.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestListener.php,v 1.1.2.6 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestListener.php,v 1.1.2.7 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -25,51 +25,51 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -interface PEAR_PHPUnit_TestListener { - // {{{ public function addError(PEAR_PHPUnit_Test $test, Exception $e) +interface PHPUnit_TestListener { + // {{{ public function addError(PHPUnit_Test $test, Exception $e) /** * An error occurred. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param Exception $e * @access public */ - public function addError(PEAR_PHPUnit_Test $test, Exception $e); + public function addError(PHPUnit_Test $test, Exception $e); // }}} - // {{{ public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A failure occurred. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public */ - public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e); + public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e); // }}} - // {{{ public function endTest(PEAR_PHPUnit_Test $test) + // {{{ public function endTest(PHPUnit_Test $test) /** * A test ended. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function endTest(PEAR_PHPUnit_Test $test); + public function endTest(PHPUnit_Test $test); // }}} - // {{{ public function startTest(PEAR_PHPUnit_Test $test) + // {{{ public function startTest(PHPUnit_Test $test) /** * A test started. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function startTest(PEAR_PHPUnit_Test $test); + public function startTest(PHPUnit_Test $test); // }}} } Index: pear/PHPUnit/TestResult.php diff -u pear/PHPUnit/TestResult.php:1.1.2.7 pear/PHPUnit/TestResult.php:1.1.2.8 --- pear/PHPUnit/TestResult.php:1.1.2.7 Wed Jun 4 05:43:30 2003 +++ pear/PHPUnit/TestResult.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestResult.php,v 1.1.2.7 2003/06/04 09:43:30 sebastian Exp $ +// $Id: TestResult.php,v 1.1.2.8 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -27,7 +27,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestResult { +class PHPUnit_TestResult { // {{{ Members /** @@ -67,18 +67,18 @@ private $stop = false; // }}} - // {{{ public function addError(PEAR_PHPUnit_Test $test, Exception $e) + // {{{ public function addError(PHPUnit_Test $test, Exception $e) /** * Adds an error to the list of errors. * The passed in exception caused the error. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param Exception $e * @access public */ - public function addError(PEAR_PHPUnit_Test $test, Exception $e) { - $this->errors[] = new PEAR_PHPUnit_TestFailure($test, $e); + public function addError(PHPUnit_Test $test, Exception $e) { + $this->errors[] = new PHPUnit_TestFailure($test, $e); for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->addError($test, $e); @@ -86,18 +86,18 @@ } // }}} - // {{{ public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * Adds a failure to the list of failures. * The passed in exception caused the failure. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public */ - public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) { - $this->failures[] = new PEAR_PHPUnit_TestFailure($test, $e); + public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) { + $this->failures[] = new PHPUnit_TestFailure($test, $e); for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->addFailure($test, $e); @@ -105,41 +105,41 @@ } // }}} - // {{{ public function addListener(PEAR_PHPUnit_TestListener $listener) + // {{{ public function addListener(PHPUnit_TestListener $listener) /** * Registers a TestListener. * - * @param PEAR_PHPUnit_TestListener + * @param PHPUnit_TestListener * @access public */ - public function addListener(PEAR_PHPUnit_TestListener $listener) { + public function addListener(PHPUnit_TestListener $listener) { $this->listeners[] = $listener; } // }}} - // {{{ public function addPassedTest(PEAR_PHPUnit_Test $test) + // {{{ public function addPassedTest(PHPUnit_Test $test) /** * Adds a passed test to the list of passed tests. * - * @param PEAR_PHPUnit_Test + * @param PHPUnit_Test * @access public */ - public function addPassedTest(PEAR_PHPUnit_Test $test) { + public function addPassedTest(PHPUnit_Test $test) { $this->passedTests[] = $test; } // }}} - // {{{ public function endTest(PEAR_PHPUnit_Test $test) + // {{{ public function endTest(PHPUnit_Test $test) /** * Informs the result that a test was completed. * - * @param PEAR_PHPUnit_Test + * @param PHPUnit_Test * @access public */ - public function endTest(PEAR_PHPUnit_Test $test) { + public function endTest(PHPUnit_Test $test) { for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->endTest($test); } @@ -211,15 +211,15 @@ } // }}} - // {{{ public function removeListener(PEAR_PHPUnit_TestListener $listener) + // {{{ public function removeListener(PHPUnit_TestListener $listener) /** * Unregisters a TestListener. * - * @param PEAR_PHPUnit_TestListener $listener + * @param PHPUnit_TestListener $listener * @access public */ - public function removeListener(PEAR_PHPUnit_TestListener $listener) { + public function removeListener(PHPUnit_TestListener $listener) { for ($i = 0; $i < sizeof($this->listeners); $i++) { if ($this->listeners[$i] === $listener) { unset($this->listeners[$i]); @@ -228,15 +228,15 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_Test $test) + // {{{ public function run(PHPUnit_Test $test) /** * Runs a TestCase. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function run(PEAR_PHPUnit_Test $test) { + public function run(PHPUnit_Test $test) { $this->startTest($test); $this->runTests++; $test->runBare(); @@ -269,15 +269,15 @@ } // }}} - // {{{ public function startTest(PEAR_PHPUnit_Test $test) + // {{{ public function startTest(PHPUnit_Test $test) /** * Informs the result that a test will be started. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function startTest(PEAR_PHPUnit_Test $test) { + public function startTest(PHPUnit_Test $test) { for ($i = 0; $i < sizeof($this->listeners); $i++) { $this->listeners[$i]->startTest($test); } Index: pear/PHPUnit/TestRunListener.php diff -u pear/PHPUnit/TestRunListener.php:1.1.2.3 pear/PHPUnit/TestRunListener.php:1.1.2.4 --- pear/PHPUnit/TestRunListener.php:1.1.2.3 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestRunListener.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestRunListener.php,v 1.1.2.3 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestRunListener.php,v 1.1.2.4 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Test.php'; @@ -27,7 +27,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -interface PEAR_PHPUnit_TestRunListener { +interface PHPUnit_TestRunListener { const STATUS_ERROR = 1; const STATUS_FAILURE = 2; Index: pear/PHPUnit/TestRunner.php diff -u pear/PHPUnit/TestRunner.php:1.1.2.11 pear/PHPUnit/TestRunner.php:1.1.2.12 --- pear/PHPUnit/TestRunner.php:1.1.2.11 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestRunner.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestRunner.php,v 1.1.2.11 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestRunner.php,v 1.1.2.12 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/AssertionFailedError.php'; @@ -27,44 +27,44 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -abstract class PEAR_PHPUnit_TestRunner implements PEAR_PHPUnit_TestListener { - // {{{ public function addError(PEAR_PHPUnit_Test $test, Exception $e) +abstract class PHPUnit_TestRunner implements PHPUnit_TestListener { + // {{{ public function addError(PHPUnit_Test $test, Exception $e) /** * An error occurred. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param Exception $e * @access public */ - public function addError(PEAR_PHPUnit_Test $test, Exception $e) { - $this->testFailed(PEAR_PHPUnit_TestRunListener::STATUS_ERROR, $test, $e); + public function addError(PHPUnit_Test $test, Exception $e) { + $this->testFailed(PHPUnit_TestRunListener::STATUS_ERROR, $test, $e); } // }}} - // {{{ public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A failure occurred. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public */ - public function addFailure(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) { - $this->testFailed(PEAR_PHPUnit_TestRunListener::STATUS_FAILURE, $test, $e); + public function addFailure(PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) { + $this->testFailed(PHPUnit_TestRunListener::STATUS_FAILURE, $test, $e); } // }}} - // {{{ public function endTest(PEAR_PHPUnit_Test $test) + // {{{ public function endTest(PHPUnit_Test $test) /** * A test ended. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function endTest(PEAR_PHPUnit_Test $test) { + public function endTest(PHPUnit_Test $test) { $this->testEnded($test->getName()); } @@ -77,25 +77,25 @@ * the runFailed() and clearStatus() methods. * * @param string $suiteClassName - * @return PEAR_PHPUnit_Test + * @return PHPUnit_Test * @access public */ public function getTest($suiteClassName) { // XXX: FIX ME: Error Handling include $suiteClassName . '.php'; - return new PEAR_PHPUnit_TestSuite($suiteClassName); + return new PHPUnit_TestSuite($suiteClassName); } // }}} - // {{{ public function startTest(PEAR_PHPUnit_Test $test) + // {{{ public function startTest(PHPUnit_Test $test) /** * A test started. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @access public */ - public function startTest(PEAR_PHPUnit_Test $test) { + public function startTest(PHPUnit_Test $test) { $this->testStarted($test->getName()); } @@ -112,18 +112,18 @@ public abstract function testEnded($testName); // }}} - // {{{ public abstract function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public abstract function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A test failed. * * @param integer $status - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e * @access public * @abstract */ - public abstract function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e); + public abstract function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e); // }}} // {{{ public abstract function testStarted($testName) Index: pear/PHPUnit/TestSuite.php diff -u pear/PHPUnit/TestSuite.php:1.1.2.3 pear/PHPUnit/TestSuite.php:1.1.2.4 --- pear/PHPUnit/TestSuite.php:1.1.2.3 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestSuite.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestSuite.php,v 1.1.2.3 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestSuite.php,v 1.1.2.4 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/Test.php'; @@ -23,14 +23,14 @@ * * Here is an example using the dynamic test definition. * - * $suite = new PEAR_PHPUnit_TestSuite(); + * $suite = new PHPUnit_TestSuite(); * $suite->addTest(new MathTest('testPass')); * * Alternatively, a TestSuite can extract the tests to be run automatically. - * To do so you pass the classname of your PEAR_PHPUnit_TestCase class to - * the PEAR_PHPUnit_TestSuite constructor. + * To do so you pass the classname of your PHPUnit_TestCase class to + * the PHPUnit_TestSuite constructor. * - * $suite = new PEAR_PHPUnit_TestSuite('classname'); + * $suite = new PHPUnit_TestSuite('classname'); * * This constructor creates a suite with all the methods starting with * "test" that take no arguments. @@ -39,7 +39,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestSuite implements PEAR_PHPUnit_Test { +class PHPUnit_TestSuite implements PHPUnit_Test { // {{{ Members /** @@ -75,15 +75,15 @@ } // }}} - // {{{ public function addTest(PEAR_PHPUnit_Test $test) + // {{{ public function addTest(PHPUnit_Test $test) /** * Adds a test to the suite. * - * @param PEAR_PHPUnit_Test + * @param PHPUnit_Test * @access public */ - public function addTest(PEAR_PHPUnit_Test $test) { + public function addTest(PHPUnit_Test $test) { $this->tests[] = $test; } @@ -141,31 +141,31 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the tests and collects their result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { for ($i = 0; $i < sizeof($this->tests) && !$result->shouldStop(); $i++) { $this->tests[$i]->run($result); } } // }}} - // {{{ public function runTest(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_TestResult $result) + // {{{ public function runTest(PHPUnit_Test $test, PHPUnit_TestResult $result) /** * Runs a test. * - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_TestResult $testResult + * @param PHPUnit_Test $test + * @param PHPUnit_TestResult $testResult * @access public */ - public function runTest(PEAR_PHPUnit_Test $test, PEAR_PHPUnit_TestResult $result) { + public function runTest(PHPUnit_Test $test, PHPUnit_TestResult $result) { $test->run($result); } Index: pear/PHPUnit/Version.php diff -u pear/PHPUnit/Version.php:1.1.2.2 pear/PHPUnit/Version.php:1.1.2.3 --- pear/PHPUnit/Version.php:1.1.2.2 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/Version.php Fri Jun 6 06:02:45 2003 @@ -12,10 +12,10 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: Version.php,v 1.1.2.2 2003/06/02 15:33:27 sebastian Exp $ +// $Id: Version.php,v 1.1.2.3 2003/06/06 10:02:45 sebastian Exp $ // -define('PEAR_PHPUnit_Version', '1.0.0-dev'); +define('PHPUnit_Version', '1.0.0-dev'); /* * vim600: et sw=2 ts=2 fdm=marker Index: pear/PHPUnit/TestDecorator/CodeCoverage.php diff -u pear/PHPUnit/TestDecorator/CodeCoverage.php:1.1.2.2 pear/PHPUnit/TestDecorator/CodeCoverage.php:1.1.2.3 --- pear/PHPUnit/TestDecorator/CodeCoverage.php:1.1.2.2 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator/CodeCoverage.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: CodeCoverage.php,v 1.1.2.2 2003/06/02 15:33:27 sebastian Exp $ +// $Id: CodeCoverage.php,v 1.1.2.3 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestDecorator.php'; @@ -24,17 +24,17 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator_CodeCoverage extends PEAR_PHPUnit_TestDecorator { - // {{{ public function run(PEAR_PHPUnit_TestResult $result) +class PHPUnit_TestDecorator_CodeCoverage extends PHPUnit_TestDecorator { + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { xdebug_start_code_coverage(); $this->test->run($result); xdebug_stop_code_coverage(); Index: pear/PHPUnit/TestDecorator/RepeatedTest.php diff -u pear/PHPUnit/TestDecorator/RepeatedTest.php:1.1.2.4 pear/PHPUnit/TestDecorator/RepeatedTest.php:1.1.2.5 --- pear/PHPUnit/TestDecorator/RepeatedTest.php:1.1.2.4 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator/RepeatedTest.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: RepeatedTest.php,v 1.1.2.4 2003/06/02 15:33:27 sebastian Exp $ +// $Id: RepeatedTest.php,v 1.1.2.5 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestDecorator.php'; @@ -24,7 +24,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator_RepeatedTest extends PEAR_PHPUnit_TestDecorator { +class PHPUnit_TestDecorator_RepeatedTest extends PHPUnit_TestDecorator { // {{{ Members /** @@ -34,16 +34,16 @@ private $timesRepeat = 1; // }}} - // {{{ public function __construct(PEAR_PHPUnit_Test $test, $timesRepeat = 1) + // {{{ public function __construct(PHPUnit_Test $test, $timesRepeat = 1) /** * Constructor. * - * @param PEAR_PHPUnit_Test $test + * @param PHPUnit_Test $test * @param integer $timesRepeat * @access public */ - public function __construct(PEAR_PHPUnit_Test $test, $timesRepeat = 1) { + public function __construct(PHPUnit_Test $test, $timesRepeat = 1) { parent::__construct($test); $this->timesRepeat = $timesRepeat; } @@ -63,16 +63,16 @@ } // }}} - // {{{ public function run(PEAR_PHPUnit_TestResult $result) + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { for ($i = 0; $i < $this->timesRepeat && !$result->shouldStop(); $i++) { $this->test->run($result); } Index: pear/PHPUnit/TestDecorator/TestSetup.php diff -u pear/PHPUnit/TestDecorator/TestSetup.php:1.1.2.3 pear/PHPUnit/TestDecorator/TestSetup.php:1.1.2.4 --- pear/PHPUnit/TestDecorator/TestSetup.php:1.1.2.3 Mon Jun 2 11:33:27 2003 +++ pear/PHPUnit/TestDecorator/TestSetup.php Fri Jun 6 06:02:45 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestSetup.php,v 1.1.2.3 2003/06/02 15:33:27 sebastian Exp $ +// $Id: TestSetup.php,v 1.1.2.4 2003/06/06 10:02:45 sebastian Exp $ // require_once 'PHPUnit/TestDecorator.php'; @@ -26,17 +26,17 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestDecorator_TestSetup extends PEAR_PHPUnit_TestDecorator { - // {{{ public function run(PEAR_PHPUnit_TestResult $result) +class PHPUnit_TestDecorator_TestSetup extends PHPUnit_TestDecorator { + // {{{ public function run(PHPUnit_TestResult $result) /** * Runs the decorated test and collects the * result in a TestResult. * - * @param PEAR_PHPUnit_TestResult $result + * @param PHPUnit_TestResult $result * @access public */ - public function run(PEAR_PHPUnit_TestResult $result) { + public function run(PHPUnit_TestResult $result) { $this->setUp(); $this->basicRun($result); $this->tearDown(); Index: pear/PHPUnit/TestRunner/CLI.php diff -u pear/PHPUnit/TestRunner/CLI.php:1.1.2.19 pear/PHPUnit/TestRunner/CLI.php:1.1.2.20 --- pear/PHPUnit/TestRunner/CLI.php:1.1.2.19 Wed Jun 4 05:52:56 2003 +++ pear/PHPUnit/TestRunner/CLI.php Fri Jun 6 06:02:45 2003 @@ -12,12 +12,11 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: CLI.php,v 1.1.2.19 2003/06/04 09:52:56 sebastian Exp $ +// $Id: CLI.php,v 1.1.2.20 2003/06/06 10:02:45 sebastian Exp $ // require_once 'Benchmark/Timer.php'; require_once 'Console/Getopt.php'; -require_once 'PHPUnit/AssertionFailedError.php'; require_once 'PHPUnit/Test.php'; require_once 'PHPUnit/TestResult.php'; require_once 'PHPUnit/TestRunner.php'; @@ -31,7 +30,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * Based upon JUnit, see http://www.junit.org/ for details. */ -class PEAR_PHPUnit_TestRunner_CLI extends PEAR_PHPUnit_TestRunner { +class PHPUnit_TestRunner_CLI extends PHPUnit_TestRunner { // {{{ public static function main() /** @@ -41,7 +40,7 @@ printf( "PHPUnit %s by Sebastian Bergmann.\n\n", - PEAR_PHPUnit_Version + PHPUnit_Version ); $options = Console_Getopt::getopt( @@ -59,7 +58,7 @@ $wait = isset($options[0][0][0]) ? true : false; if ($test) { - $testRunner = new PEAR_PHPUnit_TestRunner_CLI; + $testRunner = new PHPUnit_TestRunner_CLI; try { $result = $testRunner->doRun( @@ -81,17 +80,17 @@ } // }}} - // {{{ public function doRun(PEAR_PHPUnit_Test $suite, $wait = false) + // {{{ public function doRun(PHPUnit_Test $suite, $wait = false) /** * Runs a test suite. * - * @param PEAR_PHPUnit_Test $suite + * @param PHPUnit_Test $suite * @param optional boolean $wait */ - public function doRun(PEAR_PHPUnit_Test $suite, $wait = false) { - $result = new PEAR_PHPUnit_TestResult; - $result->addListener(new PEAR_PHPUnit_TestRunner_CLI); + public function doRun(PHPUnit_Test $suite, $wait = false) { + $result = new PHPUnit_TestResult; + $result->addListener(new PHPUnit_TestRunner_CLI); $timer = new Benchmark_Timer; $timer->start(); @@ -119,16 +118,16 @@ public function testEnded($testName) {} // }}} - // {{{ public function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) + // {{{ public function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) /** * A test failed. * * @param integer $status - * @param PEAR_PHPUnit_Test $test - * @param PEAR_PHPUnit_AssertionFailedError $e + * @param PHPUnit_Test $test + * @param PHPUnit_AssertionFailedError $e */ - public function testFailed($status, PEAR_PHPUnit_Test $test, PEAR_PHPUnit_AssertionFailedError $e) {} + public function testFailed($status, PHPUnit_Test $test, PHPUnit_AssertionFailedError $e) {} // }}} // {{{ public function testStarted($testName) @@ -151,11 +150,11 @@ */ public function printTests($tests) { foreach ($tests as $test) { - if ($test instanceof PEAR_PHPUnit_TestFailure) { + if ($test instanceof PHPUnit_TestFailure) { $exception = $test->thrownException(); $name = $test->failedTest()->getName(); - if ($exception instanceof PEAR_PHPUnit_AssertionFailedError) { + if ($exception instanceof PHPUnit_AssertionFailedError) { $prefix = 'FAIL'; } else { $prefix = 'ERROR'; @@ -190,7 +189,7 @@ // }}} } -PEAR_PHPUnit_TestRunner_CLI::main(); +PHPUnit_TestRunner_CLI::main(); /* * vim600: et sw=2 ts=2 fdm=marker