cvs: pear /PHPUnit2/Extensions ExceptionTestCase.php PerformanceTestCase.php RepeatedTest.php TestDecorator.php TestSetup.php /PHPUnit2/Framework
Assert.php AssertionFailedError.php ComparisonFailure.php Error.php Test.php TestCase.php TestFailure.php TestListener.php TestResult.php
TestSuite.php Warning.php /PHPUnit2/Runner BaseTestRunner.php IncludePathTestCollector.php StandardTestSuiteLoader.php TestCollector.php
TestRunListener.php TestSuiteLoader.php Version.php /PHPUnit2/TextUI ResultPrinter.php TestRunner.php /PHPUnit2/Util Filter.php Printer.php
Skeleton.php /PHPUnit2/Util/CodeCoverage Renderer.php /PHPUnit2/Util/CodeCoverage/Renderer HTML.php Text.php /PHPUnit2/Util/Log PEAR.php XML.php
/PHPUnit2/Util/TestDox NamePrettifier.php ResultPrinter.php /PHPUnit2/Util/TestDox/ResultPrinter HTML.php Text.php
| From: | Sebastian Bergmann | Date: | Thu, 26 May 2005 16:05:38 +0000 |
| Subject: | cvs: pear /PHPUnit2/Extensions ExceptionTestCase.php PerformanceTestCase.php RepeatedTest.php TestDecorator.php TestSetup.php /PHPUnit2/Framework Assert.php AssertionFailedError.php ComparisonFailure.php Error.php Test.php TestCase.php TestFailure.php TestListener.php TestResult.php TestSuite.php Warning.php /PHPUnit2/Runner BaseTestRunner.php IncludePathTestCollector.php StandardTestSuiteLoader.php TestCollector.php TestRunListener.php TestSuiteLoader.php Version.php /PHPUnit2/TextUI ResultPrinter.php TestRunner.php /PHPUnit2/Util Filter.php Printer.php Skeleton.php /PHPUnit2/Util/CodeCoverage Renderer.php /PHPUnit2/Util/CodeCoverage/Renderer HTML.php Text.php /PHPUnit2/Util/Log PEAR.php XML.php /PHPUnit2/Util/TestDox NamePrettifier.php ResultPrinter.php /PHPUnit2/Util/TestDox/ResultPrinter HTML.php Text.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-32135@lists.php.net to get a copy of this message | ||
sebastian Thu May 26 12:05:38 2005 EDT
Modified files:
/pear/PHPUnit2/Extensions ExceptionTestCase.php
PerformanceTestCase.php RepeatedTest.php
TestDecorator.php TestSetup.php
/pear/PHPUnit2/Framework Assert.php AssertionFailedError.php
ComparisonFailure.php Error.php Test.php
TestCase.php TestFailure.php
TestListener.php TestResult.php
TestSuite.php Warning.php
/pear/PHPUnit2/Runner BaseTestRunner.php
IncludePathTestCollector.php
StandardTestSuiteLoader.php TestCollector.php
TestRunListener.php TestSuiteLoader.php
Version.php
/pear/PHPUnit2/TextUI ResultPrinter.php TestRunner.php
/pear/PHPUnit2/Util Filter.php Printer.php Skeleton.php
/pear/PHPUnit2/Util/CodeCoverage Renderer.php
/pear/PHPUnit2/Util/CodeCoverage/Renderer HTML.php Text.php
/pear/PHPUnit2/Util/Log PEAR.php XML.php
/pear/PHPUnit2/Util/TestDox NamePrettifier.php ResultPrinter.php
/pear/PHPUnit2/Util/TestDox/ResultPrinter HTML.php Text.php
Log:
Leftover: Adopt new code formatting standard.
http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/ExceptionTestCase.php?r1=1.14&r2=1.15&ty=u Index: pear/PHPUnit2/Extensions/ExceptionTestCase.php diff -u pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.14 pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15 --- pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.14 Fri May 6 00:18:23 2005 +++ pear/PHPUnit2/Extensions/ExceptionTestCase.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ExceptionTestCase.php,v 1.14 2005/05/06 04:18:23 sebastian Exp $ + * @version CVS: $Id: ExceptionTestCase.php,v 1.15 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,28 +36,28 @@ */ class PHPUnit2_Extensions_ExceptionTestCase extends PHPUnit2_Framework_TestCase { /** - * The name of the expected Exception. - * - * @var string - * @access private - */ + * The name of the expected Exception. + * + * @var string + * @access private + */ private $expectedException = 'Exception'; /** - * @return string - * @access public - * @since Method available since Release 2.2.0 - */ + * @return string + * @access public + * @since Method available since Release 2.2.0 + */ public function getExpectedException() { return $this->expectedException; } /** - * @param string $exceptionName - * @throws InvalidArgumentException - * @access public - * @since Method available since Release 2.2.0 - */ + * @param string $exceptionName + * @throws InvalidArgumentException + * @access public + * @since Method available since Release 2.2.0 + */ public function setExpectedException($exceptionName) { if (is_string($exceptionName) && class_exists($exceptionName)) { $this->expectedException = $exceptionName; @@ -67,8 +67,8 @@ } /** - * @access protected - */ + * @access protected + */ protected function runTest() { try { parent::runTest(); http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/PerformanceTestCase.php?r1=1.14&r2=1.15&ty=u Index: pear/PHPUnit2/Extensions/PerformanceTestCase.php diff -u pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.14 pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15 --- pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.14 Fri May 6 02:32:17 2005 +++ pear/PHPUnit2/Extensions/PerformanceTestCase.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PerformanceTestCase.php,v 1.14 2005/05/06 06:32:17 sebastian Exp $ + * @version CVS: $Id: PerformanceTestCase.php,v 1.15 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -38,14 +38,14 @@ */ class PHPUnit2_Extensions_PerformanceTestCase extends PHPUnit2_Framework_TestCase { /** - * @var float - * @access private - */ + * @var float + * @access private + */ private $maxRunningTime = 0; /** - * @access protected - */ + * @access protected + */ protected function runTest() { $timer = new Benchmark_Timer; @@ -67,11 +67,11 @@ } /** - * @param float $maxRunningTime - * @throws InvalidArgumentException - * @access public - * @since Method available since Release 2.3.0 - */ + * @param float $maxRunningTime + * @throws InvalidArgumentException + * @access public + * @since Method available since Release 2.3.0 + */ public function setMaxRunningTime($maxRunningTime) { if (is_numeric($maxRunningTime) && $maxRunningTime >= 0) { @@ -82,10 +82,10 @@ } /** - * @return float - * @access public - * @since Method available since Release 2.3.0 - */ + * @return float + * @access public + * @since Method available since Release 2.3.0 + */ public function getMaxRunningTime() { return $this->maxRunningTime; } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/RepeatedTest.php?r1=1.14&r2=1.15&ty=u Index: pear/PHPUnit2/Extensions/RepeatedTest.php diff -u pear/PHPUnit2/Extensions/RepeatedTest.php:1.14 pear/PHPUnit2/Extensions/RepeatedTest.php:1.15 --- pear/PHPUnit2/Extensions/RepeatedTest.php:1.14 Tue Apr 26 06:56:30 2005 +++ pear/PHPUnit2/Extensions/RepeatedTest.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: RepeatedTest.php,v 1.14 2005/04/26 10:56:30 sebastian Exp $ + * @version CVS: $Id: RepeatedTest.php,v 1.15 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,19 +36,19 @@ */ class PHPUnit2_Extensions_RepeatedTest extends PHPUnit2_Extensions_TestDecorator { /** - * @var integer - * @access private - */ + * @var integer + * @access private + */ private $timesRepeat = 1; /** - * Constructor. - * - * @param PHPUnit2_Framework_Test $test - * @param integer $timesRepeat - * @throws InvalidArgumentException - * @access public - */ + * Constructor. + * + * @param PHPUnit2_Framework_Test $test + * @param integer $timesRepeat + * @throws InvalidArgumentException + * @access public + */ public function __construct(PHPUnit2_Framework_Test $test, $timesRepeat = 1) { parent::__construct($test); @@ -63,25 +63,25 @@ } /** - * Counts the number of test cases that - * will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that + * will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases() { return $this->timesRepeat * $this->test->countTestCases(); } /** - * Runs the decorated test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the decorated test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestDecorator.php?r1=1.13&r2=1.14&ty=u Index: pear/PHPUnit2/Extensions/TestDecorator.php diff -u pear/PHPUnit2/Extensions/TestDecorator.php:1.13 pear/PHPUnit2/Extensions/TestDecorator.php:1.14 --- pear/PHPUnit2/Extensions/TestDecorator.php:1.13 Tue Apr 26 06:56:30 2005 +++ pear/PHPUnit2/Extensions/TestDecorator.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestDecorator.php,v 1.13 2005/04/26 10:56:30 sebastian Exp $ + * @version CVS: $Id: TestDecorator.php,v 1.14 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -40,84 +40,84 @@ */ class PHPUnit2_Extensions_TestDecorator extends PHPUnit2_Framework_Assert implements PHPUnit2_Framework_Test { /** - * The Test to be decorated. - * - * @var object - * @access protected - */ + * The Test to be decorated. + * + * @var object + * @access protected + */ protected $test = NULL; /** - * Constructor. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Constructor. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function __construct(PHPUnit2_Framework_Test $test) { $this->test = $test; } /** - * Returns a string representation of the test. - * - * @return string - * @access public - */ + * Returns a string representation of the test. + * + * @return string + * @access public + */ public function toString() { return $this->test->toString(); } /** - * Runs the test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @access public - */ + * Runs the test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @access public + */ public function basicRun(PHPUnit2_Framework_TestResult $result) { $this->test->run($result); } /** - * Counts the number of test cases that - * will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that + * will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases() { return $this->test->countTestCases(); } /** - * Creates a default TestResult object. - * - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * Creates a default TestResult object. + * + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createResult() { return new PHPUnit2_Framework_TestResult; } /** - * Returns the test to be run. - * - * @return PHPUnit2_Framework_Test - * @access public - */ + * Returns the test to be run. + * + * @return PHPUnit2_Framework_Test + * @access public + */ public function getTest() { return $this->test; } /** - * Runs the decorated test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the decorated test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestSetup.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit2/Extensions/TestSetup.php diff -u pear/PHPUnit2/Extensions/TestSetup.php:1.12 pear/PHPUnit2/Extensions/TestSetup.php:1.13 --- pear/PHPUnit2/Extensions/TestSetup.php:1.12 Tue Apr 26 06:56:30 2005 +++ pear/PHPUnit2/Extensions/TestSetup.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestSetup.php,v 1.12 2005/04/26 10:56:30 sebastian Exp $ + * @version CVS: $Id: TestSetup.php,v 1.13 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -38,14 +38,14 @@ */ class PHPUnit2_Extensions_TestSetup extends PHPUnit2_Extensions_TestDecorator { /** - * Runs the decorated test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the decorated test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); @@ -66,20 +66,20 @@ } /** - * Sets up the fixture. Override to set up additional fixture - * state. - * - * @access protected - */ + * Sets up the fixture. Override to set up additional fixture + * state. + * + * @access protected + */ protected function setUp() { } /** - * Tears down the fixture. Override to tear down the additional - * fixture state. - * - * @access protected - */ + * Tears down the fixture. Override to tear down the additional + * fixture state. + * + * @access protected + */ protected function tearDown() { } } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Assert.php?r1=1.43&r2=1.44&ty=u Index: pear/PHPUnit2/Framework/Assert.php diff -u pear/PHPUnit2/Framework/Assert.php:1.43 pear/PHPUnit2/Framework/Assert.php:1.44 --- pear/PHPUnit2/Framework/Assert.php:1.43 Thu May 26 04:43:14 2005 +++ pear/PHPUnit2/Framework/Assert.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Assert.php,v 1.43 2005/05/26 08:43:14 sebastian Exp $ + * @version CVS: $Id: Assert.php,v 1.44 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -37,58 +37,58 @@ */ class PHPUnit2_Framework_Assert { /** - * @var boolean - * @access private - * @static - */ + * @var boolean + * @access private + * @static + */ private static $looselyTyped = FALSE; /** - * Protect constructor since it is a static only class. - * - * @access protected - */ + * Protect constructor since it is a static only class. + * + * @access protected + */ protected function __construct() { } /** - * Asserts that a haystack contains a needle. - * - * @param mixed $needle - * @param mixed $haystack - * @param string $message - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Asserts that a haystack contains a needle. + * + * @param mixed $needle + * @param mixed $haystack + * @param string $message + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function assertContains($needle, $haystack, $message = '') { self::doAssertContains($needle, $haystack, TRUE, $message); } /** - * Asserts that a haystack does not contain a needle. - * - * @param mixed $needle - * @param mixed $haystack - * @param string $message - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Asserts that a haystack does not contain a needle. + * + * @param mixed $needle + * @param mixed $haystack + * @param string $message + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function assertNotContains($needle, $haystack, $message = '') { self::doAssertContains($needle, $haystack, FALSE, $message); } /** - * @param mixed $needle - * @param mixed $haystack - * @param boolean $condition - * @param string $message - * @throws InvalidArgumentException - * @access private - * @static - * @since Method available since Release 2.2.0 - */ + * @param mixed $needle + * @param mixed $haystack + * @param boolean $condition + * @param string $message + * @throws InvalidArgumentException + * @access private + * @static + * @since Method available since Release 2.2.0 + */ private static function doAssertContains($needle, $haystack, $condition, $message) { $found = FALSE; @@ -140,44 +140,44 @@ } /** - * Asserts that two variables are equal. - * - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @param mixed $delta - * @access public - * @static - */ + * Asserts that two variables are equal. + * + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @param mixed $delta + * @access public + * @static + */ public static function assertEquals($expected, $actual, $message = '', $delta = 0) { self::doAssertEquals($expected, $actual, $delta, TRUE, $message); } /** - * Asserts that two variables are not equal. - * - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @param mixed $delta - * @access public - * @static - * @since Method available since Release 2.3.0 - */ + * Asserts that two variables are not equal. + * + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @param mixed $delta + * @access public + * @static + * @since Method available since Release 2.3.0 + */ public static function assertNotEquals($expected, $actual, $message = '', $delta = 0) { self::doAssertEquals($expected, $actual, $delta, FALSE, $message); } /** - * @param mixed $expected - * @param mixed $actual - * @param mixed $delta - * @param boolean $condition - * @param string $message - * @access private - * @static - * @since Method available since Release 2.3.0 - */ + * @param mixed $expected + * @param mixed $actual + * @param mixed $delta + * @param boolean $condition + * @param string $message + * @access private + * @static + * @since Method available since Release 2.3.0 + */ private static function doAssertEquals($expected, $actual, $delta, $condition, $message) { $equal = FALSE; @@ -221,14 +221,14 @@ } /** - * Asserts that a condition is true. - * - * @param boolean $condition - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that a condition is true. + * + * @param boolean $condition + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertTrue($condition, $message = '') { if (is_bool($condition)) { if (!$condition) { @@ -240,14 +240,14 @@ } /** - * Asserts that a condition is false. - * - * @param boolean $condition - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that a condition is false. + * + * @param boolean $condition + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertFalse($condition, $message = '') { if (is_bool($condition)) { self::assertTrue(!$condition, $message); @@ -257,13 +257,13 @@ } /** - * Asserts that a variable is not NULL. - * - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * Asserts that a variable is not NULL. + * + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function assertNotNull($actual, $message = '') { if (is_null($actual)) { self::fail(self::format('NOT NULL', 'NULL', $message)); @@ -271,13 +271,13 @@ } /** - * Asserts that a variable is NULL. - * - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * Asserts that a variable is NULL. + * + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function assertNull($actual, $message = '') { if (!is_null($actual)) { self::fail(self::format('NULL', 'NOT NULL', $message)); @@ -285,15 +285,15 @@ } /** - * Asserts that two variables reference the same object. - * - * @param object $object - * @param object $object - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that two variables reference the same object. + * + * @param object $object + * @param object $object + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertSame($expected, $actual, $message = '') { if ((is_object($expected) || is_null($expected)) && (is_object($actual) || is_null($actual))) { @@ -306,15 +306,15 @@ } /** - * Asserts that two variables do not reference the same object. - * - * @param object $object - * @param object $object - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that two variables do not reference the same object. + * + * @param object $object + * @param object $object + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertNotSame($expected, $actual, $message = '') { if ((is_object($expected) || is_null($expected)) && (is_object($actual) || is_null($actual))) { @@ -327,41 +327,41 @@ } /** - * Asserts that a variable is of a given type. - * - * @param string $expected - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * Asserts that a variable is of a given type. + * + * @param string $expected + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function assertType($expected, $actual, $message = '') { self::doAssertType($expected, $actual, TRUE, $message); } /** - * Asserts that a variable is not of a given type. - * - * @param string $expected - * @param mixed $actual - * @param string $message - * @access public - * @static - * @since Method available since Release 2.2.0 - */ + * Asserts that a variable is not of a given type. + * + * @param string $expected + * @param mixed $actual + * @param string $message + * @access public + * @static + * @since Method available since Release 2.2.0 + */ public static function assertNotType($expected, $actual, $message = '') { self::doAssertType($expected, $actual, FALSE, $message); } /** - * @param string $expected - * @param mixed $actual - * @param boolean $condition - * @param string $message - * @access private - * @static - * @since Method available since Release 2.2.0 - */ + * @param string $expected + * @param mixed $actual + * @param boolean $condition + * @param string $message + * @access private + * @static + * @since Method available since Release 2.2.0 + */ private static function doAssertType($expected, $actual, $condition, $message) { if (!is_string($expected)) { throw new InvalidArgumentException; @@ -391,41 +391,41 @@ } /** - * Asserts that a string matches a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @access public - * @static - */ + * Asserts that a string matches a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @access public + * @static + */ public static function assertRegExp($pattern, $string, $message = '') { self::doAssertRegExp($pattern, $string, TRUE, $message); } /** - * Asserts that a string does not match a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Asserts that a string does not match a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function assertNotRegExp($pattern, $string, $message = '') { self::doAssertRegExp($pattern, $string, FALSE, $message); } /** - * @param mixed $pattern - * @param mixed $string - * @param boolean $condition - * @param string $message - * @access private - * @static - * @since Method available since Release 2.2.0 - */ + * @param mixed $pattern + * @param mixed $string + * @param boolean $condition + * @param string $message + * @access private + * @static + * @since Method available since Release 2.2.0 + */ private static function doAssertRegExp($pattern, $string, $condition, $message) { if (!is_string($pattern) || !is_string($string)) { throw new InvalidArgumentException; @@ -461,23 +461,23 @@ } /** - * Fails a test with the given message. - * - * @param string $message - * @throws PHPUnit2_Framework_AssertionFailedError - * @access public - * @static - */ + * Fails a test with the given message. + * + * @param string $message + * @throws PHPUnit2_Framework_AssertionFailedError + * @access public + * @static + */ public static function fail($message = '') { throw new PHPUnit2_Framework_AssertionFailedError($message); } /** - * @param string $message - * @throws PHPUnit2_Framework_AssertionFailedError - * @access private - * @static - */ + * @param string $message + * @throws PHPUnit2_Framework_AssertionFailedError + * @access private + * @static + */ private static function failSame($message) { self::fail( sprintf( @@ -490,13 +490,13 @@ } /** - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @throws PHPUnit2_Framework_AssertionFailedError - * @access private - * @static - */ + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @throws PHPUnit2_Framework_AssertionFailedError + * @access private + * @static + */ private static function failNotSame($expected, $actual, $message) { if (is_string($expected) && is_string($actual)) { throw new PHPUnit2_Framework_ComparisonFailure($expected, $actual, $message); @@ -515,12 +515,12 @@ } /** - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function format($expected, $actual, $message) { return sprintf( '%s%sexpected: <%s> but was: <%s>', @@ -533,10 +533,10 @@ } /** - * @param boolean $looselyTyped - * @access public - * @static - */ + * @param boolean $looselyTyped + * @access public + * @static + */ public static function setLooselyTyped($looselyTyped) { if (is_bool($looselyTyped)) { self::$looselyTyped = $looselyTyped; @@ -544,12 +544,12 @@ } /** - * Converts a value to a string. - * - * @param mixed $value - * @access private - * @static - */ + * Converts a value to a string. + * + * @param mixed $value + * @access private + * @static + */ private static function convertToString($value) { foreach ($value as $k => $v) { if (is_array($v)) { @@ -565,11 +565,11 @@ } /** - * @param mixed $object - * @return string - * @access private - * @static - */ + * @param mixed $object + * @return string + * @access private + * @static + */ private static function objectToString($object) { if (is_array($object) || is_object($object)) { $object = serialize($object); @@ -579,13 +579,13 @@ } /** - * Sorts an array recursively by its keys. - * - * @param array $array - * @access private - * @static - * @author Adam Maccabee Trachtenberg <adam@trachtenberg.com> - */ + * Sorts an array recursively by its keys. + * + * @param array $array + * @access private + * @static + * @author Adam Maccabee Trachtenberg <adam@trachtenberg.com> + */ private static function sortArrayRecursively(&$array) { ksort($array); http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/AssertionFailedError.php?r1=1.8&r2=1.9&ty=u Index: pear/PHPUnit2/Framework/AssertionFailedError.php diff -u pear/PHPUnit2/Framework/AssertionFailedError.php:1.8 pear/PHPUnit2/Framework/AssertionFailedError.php:1.9 --- pear/PHPUnit2/Framework/AssertionFailedError.php:1.8 Wed Apr 27 00:51:17 2005 +++ pear/PHPUnit2/Framework/AssertionFailedError.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: AssertionFailedError.php,v 1.8 2005/04/27 04:51:17 sebastian Exp $ + * @version CVS: $Id: AssertionFailedError.php,v 1.9 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,11 +34,11 @@ */ class PHPUnit2_Framework_AssertionFailedError extends Exception { /** - * Wrapper for getMessage() which is declared as final. - * - * @return string - * @access public - */ + * Wrapper for getMessage() which is declared as final. + * + * @return string + * @access public + */ public function toString() { return $this->getMessage(); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/ComparisonFailure.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit2/Framework/ComparisonFailure.php diff -u pear/PHPUnit2/Framework/ComparisonFailure.php:1.12 pear/PHPUnit2/Framework/ComparisonFailure.php:1.13 --- pear/PHPUnit2/Framework/ComparisonFailure.php:1.12 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/ComparisonFailure.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ComparisonFailure.php,v 1.12 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: ComparisonFailure.php,v 1.13 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,25 +36,25 @@ */ class PHPUnit2_Framework_ComparisonFailure extends PHPUnit2_Framework_AssertionFailedError { /** - * @var string - * @access private - */ + * @var string + * @access private + */ private $expected = ''; /** - * @var string - * @access private - */ + * @var string + * @access private + */ private $actual = ''; /** - * Constructs a comparison failure. - * - * @param string $expected - * @param string $actual - * @param string $message - * @access public - */ + * Constructs a comparison failure. + * + * @param string $expected + * @param string $actual + * @param string $message + * @access public + */ public function __construct($expected, $actual, $message = '') { parent::__construct($message); @@ -63,12 +63,12 @@ } /** - * Returns "..." in place of common prefix and "..." in - * place of common suffix between expected and actual. - * - * @return string - * @access public - */ + * Returns "..." in place of common prefix and "..." in + * place of common suffix between expected and actual. + * + * @return string + * @access public + */ public function toString() { $end = min(strlen($this->expected), strlen($this->actual)); $i = 0; http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Error.php?r1=1.3&r2=1.4&ty=u Index: pear/PHPUnit2/Framework/Error.php diff -u pear/PHPUnit2/Framework/Error.php:1.3 pear/PHPUnit2/Framework/Error.php:1.4 --- pear/PHPUnit2/Framework/Error.php:1.3 Mon Apr 11 01:48:08 2005 +++ pear/PHPUnit2/Framework/Error.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Error.php,v 1.3 2005/04/11 05:48:08 sebastian Exp $ + * @version CVS: $Id: Error.php,v 1.4 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.2.0 */ @@ -34,15 +34,15 @@ */ class PHPUnit2_Framework_Error extends Exception { /** - * - * - * @param string $message - * @param integer $code - * @param string $file - * @param integer $line - * @param array $trace - * @access public - */ + * Constructor. + * + * @param string $message + * @param integer $code + * @param string $file + * @param integer $line + * @param array $trace + * @access public + */ public function __construct($message, $code, $file, $line, $trace) { parent::__construct($message, $code); http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Test.php?r1=1.11&r2=1.12&ty=u Index: pear/PHPUnit2/Framework/Test.php diff -u pear/PHPUnit2/Framework/Test.php:1.11 pear/PHPUnit2/Framework/Test.php:1.12 --- pear/PHPUnit2/Framework/Test.php:1.11 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/Test.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Test.php,v 1.11 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: Test.php,v 1.12 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,20 +36,20 @@ */ interface PHPUnit2_Framework_Test { /** - * Counts the number of test cases that will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases(); /** - * Runs a test and collects its result in a TestResult instance. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @access public - */ + * Runs a test and collects its result in a TestResult instance. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @access public + */ public function run($result = NULL); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestCase.php?r1=1.31&r2=1.32&ty=u Index: pear/PHPUnit2/Framework/TestCase.php diff -u pear/PHPUnit2/Framework/TestCase.php:1.31 pear/PHPUnit2/Framework/TestCase.php:1.32 --- pear/PHPUnit2/Framework/TestCase.php:1.31 Mon May 23 00:37:27 2005 +++ pear/PHPUnit2/Framework/TestCase.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestCase.php,v 1.31 2005/05/23 04:37:27 sebastian Exp $ + * @version CVS: $Id: TestCase.php,v 1.32 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -81,19 +81,19 @@ */ abstract class PHPUnit2_Framework_TestCase extends PHPUnit2_Framework_Assert implements PHPUnit2_Framework_Test { /** - * The name of the test case. - * - * @var string - * @access private - */ + * The name of the test case. + * + * @var string + * @access private + */ private $name = NULL; /** - * Constructs a test case with the given name. - * - * @param string - * @access public - */ + * Constructs a test case with the given name. + * + * @param string + * @access public + */ public function __construct($name = NULL) { if ($name !== NULL) { $this->setName($name); @@ -101,11 +101,11 @@ } /** - * Returns a string representation of the test case. - * - * @return string - * @access public - */ + * Returns a string representation of the test case. + * + * @return string + * @access public + */ public function toString() { $class = new ReflectionClass($this); @@ -118,34 +118,34 @@ } /** - * Counts the number of test cases executed by run(TestResult result). - * - * @return integer - * @access public - */ + * Counts the number of test cases executed by run(TestResult result). + * + * @return integer + * @access public + */ public function countTestCases() { return 1; } /** - * Gets the name of a TestCase. - * - * @return string - * @access public - */ + * Gets the name of a TestCase. + * + * @return string + * @access public + */ public function getName() { return $this->name; } /** - * Runs the test case and collects the results in a TestResult object. - * If no TestResult object is passed a new one will be created. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the test case and collects the results in a TestResult object. + * If no TestResult object is passed a new one will be created. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); @@ -164,10 +164,10 @@ } /** - * Runs the bare test sequence. - * - * @access public - */ + * Runs the bare test sequence. + * + * @access public + */ public function runBare() { $catchedException = NULL; @@ -190,11 +190,11 @@ } /** - * Override to run the test and assert its state. - * - * @throws PHPUnit2_Framework_Error - * @access protected - */ + * Override to run the test and assert its state. + * + * @throws PHPUnit2_Framework_Error + * @access protected + */ protected function runTest() { if ($this->name === NULL) { throw new PHPUnit2_Framework_Error( @@ -217,40 +217,40 @@ } /** - * Sets the name of a TestCase. - * - * @param string - * @access public - */ + * Sets the name of a TestCase. + * + * @param string + * @access public + */ public function setName($name) { $this->name = $name; } /** - * Creates a default TestResult object. - * - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * Creates a default TestResult object. + * + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createResult() { return new PHPUnit2_Framework_TestResult; } /** - * Sets up the fixture, for example, open a network connection. - * This method is called before a test is executed. - * - * @access protected - */ + * Sets up the fixture, for example, open a network connection. + * This method is called before a test is executed. + * + * @access protected + */ protected function setUp() { } /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - * - * @access protected - */ + * Tears down the fixture, for example, close a network connection. + * This method is called after a test is executed. + * + * @access protected + */ protected function tearDown() { } } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestFailure.php?r1=1.9&r2=1.10&ty=u Index: pear/PHPUnit2/Framework/TestFailure.php diff -u pear/PHPUnit2/Framework/TestFailure.php:1.9 pear/PHPUnit2/Framework/TestFailure.php:1.10 --- pear/PHPUnit2/Framework/TestFailure.php:1.9 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/TestFailure.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestFailure.php,v 1.9 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: TestFailure.php,v 1.10 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,35 +36,35 @@ */ class PHPUnit2_Framework_TestFailure { /** - * @var PHPUnit2_Framework_Test - * @access protected - */ + * @var PHPUnit2_Framework_Test + * @access protected + */ protected $failedTest; /** - * @var Exception - * @access protected - */ + * @var Exception + * @access protected + */ protected $thrownException; /** - * Constructs a TestFailure with the given test and exception. - * - * @param PHPUnit2_Framework_Test $failedTest - * @param Exception $thrownException - * @access public - */ + * Constructs a TestFailure with the given test and exception. + * + * @param PHPUnit2_Framework_Test $failedTest + * @param Exception $thrownException + * @access public + */ public function __construct(PHPUnit2_Framework_Test $failedTest, Exception $thrownException) { $this->failedTest = $failedTest; $this->thrownException = $thrownException; } /** - * Returns a short description of the failure. - * - * @return string - * @access public - */ + * Returns a short description of the failure. + * + * @return string + * @access public + */ public function toString() { return sprintf( '%s: %s', @@ -75,42 +75,42 @@ } /** - * Gets the failed test. - * - * @return Test - * @access public - */ + * Gets the failed test. + * + * @return Test + * @access public + */ public function failedTest() { return $this->failedTest; } /** - * Gets the thrown exception. - * - * @return Exception - * @access public - */ + * Gets the thrown exception. + * + * @return Exception + * @access public + */ public function thrownException() { return $this->thrownException; } /** - * Returns the exception's message. - * - * @return string - * @access public - */ + * Returns the exception's message. + * + * @return string + * @access public + */ public function exceptionMessage() { return $this->thrownException()->getMessage(); } /** - * Returns TRUE if the thrown exception - * is of type AssertionFailedError. - * - * @return boolean - * @access public - */ + * Returns TRUE if the thrown exception + * is of type AssertionFailedError. + * + * @return boolean + * @access public + */ public function isFailure() { return ($this->thrownException() instanceof PHPUnit2_Framework_AssertionFailedError); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestListener.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Framework/TestListener.php diff -u pear/PHPUnit2/Framework/TestListener.php:1.10 pear/PHPUnit2/Framework/TestListener.php:1.11 --- pear/PHPUnit2/Framework/TestListener.php:1.10 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/TestListener.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestListener.php,v 1.10 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: TestListener.php,v 1.11 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,64 +36,64 @@ */ interface PHPUnit2_Framework_TestListener { /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e); /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e); /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e); /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite); /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite); /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test); /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestResult.php?r1=1.30&r2=1.31&ty=u Index: pear/PHPUnit2/Framework/TestResult.php diff -u pear/PHPUnit2/Framework/TestResult.php:1.30 pear/PHPUnit2/Framework/TestResult.php:1.31 --- pear/PHPUnit2/Framework/TestResult.php:1.30 Thu May 26 05:41:34 2005 +++ pear/PHPUnit2/Framework/TestResult.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestResult.php,v 1.30 2005/05/26 09:41:34 sebastian Exp $ + * @version CVS: $Id: TestResult.php,v 1.31 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -37,71 +37,71 @@ */ class PHPUnit2_Framework_TestResult { /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $errors = array(); /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $failures = array(); /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $notImplemented = array(); /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $listeners = array(); /** - * @var integer - * @access protected - */ + * @var integer + * @access protected + */ protected $runTests = 0; /** - * Code Coverage information provided by Xdebug. - * - * @var array - * @access protected - */ + * Code Coverage information provided by Xdebug. + * + * @var array + * @access protected + */ protected $codeCoverageInformation = array(); /** - * @var boolean - * @access protected - */ + * @var boolean + * @access protected + */ protected $collectCodeCoverageInformation = FALSE; /** - * @var boolean - * @access private - */ + * @var boolean + * @access private + */ private $stop = FALSE; /** - * Registers a TestListener. - * - * @param PHPUnit2_Framework_TestListener - * @access public - */ + * Registers a TestListener. + * + * @param PHPUnit2_Framework_TestListener + * @access public + */ public function addListener(PHPUnit2_Framework_TestListener $listener) { $this->listeners[] = $listener; } /** - * Unregisters a TestListener. - * - * @param PHPUnit2_Framework_TestListener $listener - * @access public - */ + * Unregisters a TestListener. + * + * @param PHPUnit2_Framework_TestListener $listener + * @access public + */ public function removeListener(PHPUnit2_Framework_TestListener $listener) { for ($i = 0; $i < sizeof($this->listeners); $i++) { if ($this->listeners[$i] === $listener) { @@ -111,13 +111,13 @@ } /** - * Adds an error to the list of errors. - * The passed in exception caused the error. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Adds an error to the list of errors. + * The passed in exception caused the error. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { if ($e instanceof PHPUnit2_Framework_IncompleteTest) { $this->notImplemented[] = new PHPUnit2_Framework_TestFailure($test, $e); @@ -135,13 +135,13 @@ } /** - * Adds a failure to the list of failures. - * The passed in exception caused the failure. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * Adds a failure to the list of failures. + * The passed in exception caused the failure. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { if ($e instanceof PHPUnit2_Framework_IncompleteTest) { $this->notImplemented[] = new PHPUnit2_Framework_TestFailure($test, $e); @@ -159,12 +159,12 @@ } /** - * Informs the result that a testsuite will be started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * Informs the result that a testsuite will be started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { foreach ($this->listeners as $listener) { $listener->startTestSuite($suite); @@ -172,12 +172,12 @@ } /** - * Informs the result that a testsuite was completed. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * Informs the result that a testsuite was completed. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { foreach ($this->listeners as $listener) { $listener->endTestSuite($suite); @@ -185,11 +185,11 @@ } /** - * Informs the result that a test will be started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Informs the result that a test will be started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $this->runTests += $test->countTestCases(); @@ -199,11 +199,11 @@ } /** - * Informs the result that a test was completed. - * - * @param PHPUnit2_Framework_Test - * @access public - */ + * Informs the result that a test was completed. + * + * @param PHPUnit2_Framework_Test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { foreach ($this->listeners as $listener) { $listener->endTest($test); @@ -211,83 +211,83 @@ } /** - * Returns TRUE if no incomplete test occured. - * - * @return boolean - * @access public - */ + * Returns TRUE if no incomplete test occured. + * + * @return boolean + * @access public + */ public function allCompletlyImplemented() { return $this->notImplementedCount() == 0; } /** - * Gets the number of incomplete tests. - * - * @return integer - * @access public - */ + * Gets the number of incomplete tests. + * + * @return integer + * @access public + */ public function notImplementedCount() { return sizeof($this->notImplemented); } /** - * Returns an Enumeration for the incomplete tests. - * - * @return array - * @access public - */ + * Returns an Enumeration for the incomplete tests. + * + * @return array + * @access public + */ public function notImplemented() { return $this->notImplemented; } /** - * Gets the number of detected errors. - * - * @return integer - * @access public - */ + * Gets the number of detected errors. + * + * @return integer + * @access public + */ public function errorCount() { return sizeof($this->errors); } /** - * Returns an Enumeration for the errors. - * - * @return array - * @access public - */ + * Returns an Enumeration for the errors. + * + * @return array + * @access public + */ public function errors() { return $this->errors; } /** - * Gets the number of detected failures. - * - * @return integer - * @access public - */ + * Gets the number of detected failures. + * + * @return integer + * @access public + */ public function failureCount() { return sizeof($this->failures); } /** - * Returns an Enumeration for the failures. - * - * @return array - * @access public - */ + * Returns an Enumeration for the failures. + * + * @return array + * @access public + */ public function failures() { return $this->failures; } /** - * Enables or disables the collection of Code Coverage information. - * - * @param boolean $flag - * @throws InvalidArgumentException - * @access public - * @since Method available since Release 2.3.0 - */ + * Enables or disables the collection of Code Coverage information. + * + * @param boolean $flag + * @throws InvalidArgumentException + * @access public + * @since Method available since Release 2.3.0 + */ public function collectCodeCoverageInformation($flag) { if (is_bool($flag)) { $this->collectCodeCoverageInformation = $flag; @@ -297,33 +297,33 @@ } /** - * Returns Code Coverage data per test case. - * - * Format of the result array: - * - * <code> - * array( - * "testCase" => array( - * "/tested/code.php" => array( - * linenumber => numberOfExecutions - * ) - * ) - * ) - * </code> - * - * @return array - * @access public - */ + * Returns Code Coverage data per test case. + * + * Format of the result array: + * + * <code> + * array( + * "testCase" => array( + * "/tested/code.php" => array( + * linenumber => numberOfExecutions + * ) + * ) + * ) + * </code> + * + * @return array + * @access public + */ public function getCodeCoverageInformation() { return $this->codeCoverageInformation; } /** - * Runs a TestCase. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Runs a TestCase. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function run(PHPUnit2_Framework_Test $test) { $this->startTest($test); @@ -365,40 +365,40 @@ } /** - * Gets the number of run tests. - * - * @return integer - * @access public - */ + * Gets the number of run tests. + * + * @return integer + * @access public + */ public function runCount() { return $this->runTests; } /** - * Checks whether the test run should stop. - * - * @return boolean - * @access public - */ + * Checks whether the test run should stop. + * + * @return boolean + * @access public + */ public function shouldStop() { return $this->stop; } /** - * Marks that the test run should stop. - * - * @access public - */ + * Marks that the test run should stop. + * + * @access public + */ public function stop() { $this->stop = TRUE; } /** - * Returns whether the entire test was successful or not. - * - * @return boolean - * @access public - */ + * Returns whether the entire test was successful or not. + * + * @return boolean + * @access public + */ public function wasSuccessful() { return empty($this->errors) && empty($this->failures); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestSuite.php?r1=1.24&r2=1.25&ty=u Index: pear/PHPUnit2/Framework/TestSuite.php diff -u pear/PHPUnit2/Framework/TestSuite.php:1.24 pear/PHPUnit2/Framework/TestSuite.php:1.25 --- pear/PHPUnit2/Framework/TestSuite.php:1.24 Thu May 5 11:28:26 2005 +++ pear/PHPUnit2/Framework/TestSuite.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestSuite.php,v 1.24 2005/05/05 15:28:26 sebastian Exp $ + * @version CVS: $Id: TestSuite.php,v 1.25 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -61,43 +61,43 @@ */ class PHPUnit2_Framework_TestSuite implements PHPUnit2_Framework_Test { /** - * The name of the test suite. - * - * @var string - * @access private - */ + * The name of the test suite. + * + * @var string + * @access private + */ private $name = ''; /** - * The tests in the test suite. - * - * @var array - * @access private - */ + * The tests in the test suite. + * + * @var array + * @access private + */ private $tests = array(); /** - * Constructs a new TestSuite: - * - * - PHPUnit2_Framework_TestSuite() constructs an empty TestSuite. - * - * - PHPUnit2_Framework_TestSuite(ReflectionClass) constructs a - * TestSuite from the given class. - * - * - PHPUnit2_Framework_TestSuite(ReflectionClass, String) - * constructs a TestSuite from the given class with the given - * name. - * - * - PHPUnit2_Framework_TestSuite(String) either constructs a - * TestSuite from the given class (if the passed string is the - * name of an existing class) or constructs an empty TestSuite - * with the given name. - * - * @param mixed $theClass - * @param string $name - * @throws InvalidArgumentException - * @access public - */ + * Constructs a new TestSuite: + * + * - PHPUnit2_Framework_TestSuite() constructs an empty TestSuite. + * + * - PHPUnit2_Framework_TestSuite(ReflectionClass) constructs a + * TestSuite from the given class. + * + * - PHPUnit2_Framework_TestSuite(ReflectionClass, String) + * constructs a TestSuite from the given class with the given + * name. + * + * - PHPUnit2_Framework_TestSuite(String) either constructs a + * TestSuite from the given class (if the passed string is the + * name of an existing class) or constructs an empty TestSuite + * with the given name. + * + * @param mixed $theClass + * @param string $name + * @throws InvalidArgumentException + * @access public + */ public function __construct($theClass = '', $name = '') { $argumentsValid = FALSE; @@ -169,31 +169,31 @@ } /** - * Returns a string representation of the test suite. - * - * @return string - * @access public - */ + * Returns a string representation of the test suite. + * + * @return string + * @access public + */ public function toString() { return $this->getName(); } /** - * Adds a test to the suite. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Adds a test to the suite. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function addTest(PHPUnit2_Framework_Test $test) { $this->tests[] = $test; } /** - * Adds the tests from the given class to the suite. - * - * @param mixed $testClass - * @access public - */ + * Adds the tests from the given class to the suite. + * + * @param mixed $testClass + * @access public + */ public function addTestSuite($testClass) { if (is_string($testClass) && class_exists($testClass)) { @@ -207,11 +207,11 @@ } /** - * Counts the number of test cases that will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases() { $count = 0; @@ -223,12 +223,12 @@ } /** - * @param ReflectionClass $theClass - * @param string $name - * @return PHPUnit2_Framework_Test - * @access public - * @static - */ + * @param ReflectionClass $theClass + * @param string $name + * @return PHPUnit2_Framework_Test + * @access public + * @static + */ public static function createTest(ReflectionClass $theClass, $name) { if (!$theClass->isInstantiable()) { return self::warning( @@ -271,33 +271,33 @@ } /** - * Creates a default TestResult object. - * - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * Creates a default TestResult object. + * + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createResult() { return new PHPUnit2_Framework_TestResult; } /** - * Returns the name of the suite. - * - * @return string - * @access public - */ + * Returns the name of the suite. + * + * @return string + * @access public + */ public function getName() { return $this->name; } /** - * Runs the tests and collects their result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the tests and collects their result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); @@ -326,33 +326,33 @@ } /** - * Runs a test. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_TestResult $testResult - * @access public - */ + * Runs a test. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_TestResult $testResult + * @access public + */ public function runTest(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_TestResult $result) { $test->run($result); } /** - * Sets the name of the suite. - * - * @param string - * @access public - */ + * Sets the name of the suite. + * + * @param string + * @access public + */ public function setName($name) { $this->name = $name; } /** - * Returns the test at the given index. - * - * @param integer - * @return PHPUnit2_Framework_Test - * @access public - */ + * Returns the test at the given index. + * + * @param integer + * @return PHPUnit2_Framework_Test + * @access public + */ public function testAt($index) { if (isset($this->tests[$index])) { return $this->tests[$index]; @@ -362,31 +362,31 @@ } /** - * Returns the number of tests in this suite. - * - * @return integer - * @access public - */ + * Returns the number of tests in this suite. + * + * @return integer + * @access public + */ public function testCount() { return sizeof($this->tests); } /** - * Returns the tests as an enumeration. - * - * @return array - * @access public - */ + * Returns the tests as an enumeration. + * + * @return array + * @access public + */ public function tests() { return $this->tests; } /** - * @param ReflectionMethod $method - * @param array $names - * @param ReflectionClass $theClass - * @access private - */ + * @param ReflectionMethod $method + * @param array $names + * @param ReflectionClass $theClass + * @access private + */ private function addTestMethod(ReflectionMethod $method, &$names, ReflectionClass $theClass) { $name = $method->getName(); @@ -419,29 +419,29 @@ } /** - * @param ReflectionMethod $method - * @return boolean - * @access private - */ + * @param ReflectionMethod $method + * @return boolean + * @access private + */ private function isPublicTestMethod(ReflectionMethod $method) { return ($this->isTestMethod($method) && $method->isPublic()); } /** - * @param ReflectionMethod $method - * @return boolean - * @access private - */ + * @param ReflectionMethod $method + * @return boolean + * @access private + */ private function isTestMethod(ReflectionMethod $method) { return (substr($method->name, 0, 4) == 'test'); } /** - * @param string $message - * @return PHPUnit2_Framework_Warning - * @access private - */ + * @param string $message + * @return PHPUnit2_Framework_Warning + * @access private + */ private static function warning($message) { return new PHPUnit2_Framework_Warning($message); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Warning.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Framework/Warning.php diff -u pear/PHPUnit2/Framework/Warning.php:1.10 pear/PHPUnit2/Framework/Warning.php:1.11 --- pear/PHPUnit2/Framework/Warning.php:1.10 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/Warning.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Warning.php,v 1.10 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: Warning.php,v 1.11 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,23 +36,23 @@ */ class PHPUnit2_Framework_Warning extends PHPUnit2_Framework_TestCase { /** - * @var string - * @access private - */ + * @var string + * @access private + */ private $message = ''; /** - * @param string $message - * @access public - */ + * @param string $message + * @access public + */ public function __construct($message = '') { $this->message = $message; parent::__construct('Warning'); } /** - * @access protected - */ + * @access protected + */ protected function runTest() { $this->fail($this->message); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/BaseTestRunner.php?r1=1.16&r2=1.17&ty=u Index: pear/PHPUnit2/Runner/BaseTestRunner.php diff -u pear/PHPUnit2/Runner/BaseTestRunner.php:1.16 pear/PHPUnit2/Runner/BaseTestRunner.php:1.17 --- pear/PHPUnit2/Runner/BaseTestRunner.php:1.16 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Runner/BaseTestRunner.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: BaseTestRunner.php,v 1.16 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: BaseTestRunner.php,v 1.17 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -39,98 +39,98 @@ const SUITE_METHODNAME = 'suite'; /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed(PHPUnit2_Runner_TestRunListener::STATUS_ERROR, $test, $e); } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->testFailed(PHPUnit2_Runner_TestRunListener::STATUS_FAILURE, $test, $e); } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed(PHPUnit2_Runner_TestRunListener::STATUS_INCOMPLETE, $test, $e); } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $this->testStarted($test->getName()); } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $this->testEnded($test->getName()); } /** - * Returns the loader to be used. - * - * @return PHPUnit2_Runner_TestSuiteLoader - * @access public - */ + * Returns the loader to be used. + * + * @return PHPUnit2_Runner_TestSuiteLoader + * @access public + */ public function getLoader() { return new PHPUnit2_Runner_StandardTestSuiteLoader; } /** - * Returns the Test corresponding to the given suite. - * This is a template method, subclasses override - * the runFailed() and clearStatus() methods. - * - * @param string $suiteClassName - * @param string $suiteClassFile - * @return PHPUnit2_Framework_Test - * @access public - */ + * Returns the Test corresponding to the given suite. + * This is a template method, subclasses override + * the runFailed() and clearStatus() methods. + * + * @param string $suiteClassName + * @param string $suiteClassFile + * @return PHPUnit2_Framework_Test + * @access public + */ public function getTest($suiteClassName, $suiteClassFile = '') { if ($suiteClassFile == $suiteClassName . '.php') { $suiteClassFile = ''; @@ -183,62 +183,62 @@ } /** - * Override to define how to handle a failed loading of - * a test suite. - * - * @param string $message - * @access protected - * @abstract - */ + * Override to define how to handle a failed loading of + * a test suite. + * + * @param string $message + * @access protected + * @abstract + */ protected abstract function runFailed($message); /** - * Returns the loaded ReflectionClass for a suite name. - * - * @param string $suiteClassName - * @param string $suiteClassFile - * @return ReflectionClass - * @access protected - */ + * Returns the loaded ReflectionClass for a suite name. + * + * @param string $suiteClassName + * @param string $suiteClassFile + * @return ReflectionClass + * @access protected + */ protected function loadSuiteClass($suiteClassName, $suiteClassFile = '') { return $this->getLoader()->load($suiteClassName, $suiteClassFile); } /** - * Clears the status message. - * - * @access protected - */ + * Clears the status message. + * + * @access protected + */ protected function clearStatus() { } /** - * A test started. - * - * @param string $testName - * @access public - * @abstract - */ + * A test started. + * + * @param string $testName + * @access public + * @abstract + */ public abstract function testStarted($testName); /** - * A test ended. - * - * @param string $testName - * @access public - * @abstract - */ + * A test ended. + * + * @param string $testName + * @access public + * @abstract + */ public abstract function testEnded($testName); /** - * A test failed. - * - * @param integer $status - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - * @abstract - */ + * A test failed. + * + * @param integer $status + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + * @abstract + */ public abstract function testFailed($status, PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/IncludePathTestCollector.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit2/Runner/IncludePathTestCollector.php diff -u pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.12 pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13 --- pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.12 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Runner/IncludePathTestCollector.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: IncludePathTestCollector.php,v 1.12 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: IncludePathTestCollector.php,v 1.13 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -39,9 +39,9 @@ class PHPUnit2_Runner_IncludePathTestCollector implements PHPUnit2_Runner_TestCollector { /** - * @return array - * @access public - */ + * @return array + * @access public + */ public function collectTests() { $iterator = new AppendIterator; $result = array(); @@ -76,13 +76,13 @@ } /** - * Considers a file to contain a test class when it contains the - * pattern "Test" in its name and its name ends with ".php". - * - * @param string $classFileName - * @return boolean - * @access protected - */ + * Considers a file to contain a test class when it contains the + * pattern "Test" in its name and its name ends with ".php". + * + * @param string $classFileName + * @return boolean + * @access protected + */ protected function isTestClass($classFileName) { return (strpos($classFileName, 'Test') !== FALSE && substr($classFileName, -4) == '.php') ? TRUE : FALSE; } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/StandardTestSuiteLoader.php?r1=1.18&r2=1.19&ty=u Index: pear/PHPUnit2/Runner/StandardTestSuiteLoader.php diff -u pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.18 pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19 --- pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.18 Sat Apr 30 10:52:46 2005 +++ pear/PHPUnit2/Runner/StandardTestSuiteLoader.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: StandardTestSuiteLoader.php,v 1.18 2005/04/30 14:52:46 sebastian Exp $ + * @version CVS: $Id: StandardTestSuiteLoader.php,v 1.19 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,12 +36,12 @@ */ class PHPUnit2_Runner_StandardTestSuiteLoader implements PHPUnit2_Runner_TestSuiteLoader { /** - * @param string $suiteClassName - * @param string $suiteClassFile - * @return ReflectionClass - * @throws RuntimeException - * @access public - */ + * @param string $suiteClassName + * @param string $suiteClassFile + * @return ReflectionClass + * @throws RuntimeException + * @access public + */ public function load($suiteClassName, $suiteClassFile = '') { $suiteClassName = str_replace('.php', '', $suiteClassName); $suiteClassFile = !empty($suiteClassFile) ? $suiteClassFile : str_replace('_', '/', $suiteClassName) . '.php'; @@ -82,10 +82,10 @@ } /** - * @param ReflectionClass $aClass - * @return ReflectionClass - * @access public - */ + * @param ReflectionClass $aClass + * @return ReflectionClass + * @access public + */ public function reload(ReflectionClass $aClass) { return $aClass; } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/TestCollector.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit2/Runner/TestCollector.php diff -u pear/PHPUnit2/Runner/TestCollector.php:1.6 pear/PHPUnit2/Runner/TestCollector.php:1.7 --- pear/PHPUnit2/Runner/TestCollector.php:1.6 Mon Apr 18 10:11:55 2005 +++ pear/PHPUnit2/Runner/TestCollector.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestCollector.php,v 1.6 2005/04/18 14:11:55 sebastian Exp $ + * @version CVS: $Id: TestCollector.php,v 1.7 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -35,9 +35,9 @@ */ interface PHPUnit2_Runner_TestCollector { /** - * @return array - * @access public - */ + * @return array + * @access public + */ public function collectTests(); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/TestRunListener.php?r1=1.7&r2=1.8&ty=u Index: pear/PHPUnit2/Runner/TestRunListener.php diff -u pear/PHPUnit2/Runner/TestRunListener.php:1.7 pear/PHPUnit2/Runner/TestRunListener.php:1.8 --- pear/PHPUnit2/Runner/TestRunListener.php:1.7 Mon Apr 18 10:11:55 2005 +++ pear/PHPUnit2/Runner/TestRunListener.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestRunListener.php,v 1.7 2005/04/18 14:11:55 sebastian Exp $ + * @version CVS: $Id: TestRunListener.php,v 1.8 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -23,7 +23,7 @@ /** * A listener interface for observing the * execution of a test run. Unlike TestListener, - * this interface using only primitive objects, + * this interface uses only primitive objects, * making it suitable for remote test execution. * * @category Testing @@ -41,41 +41,41 @@ const STATUS_INCOMPLETE = 3; /** - * @param string $testSuiteName - * @param integer $testCount - * @access public - */ + * @param string $testSuiteName + * @param integer $testCount + * @access public + */ public function testRunStarted($testSuiteName, $testCount); /** - * @param integer $elapsedTime - */ + * @param integer $elapsedTime + */ public function testRunEnded($elapsedTime); /** - * @param integer $elapsedTime - * @access public - */ + * @param integer $elapsedTime + * @access public + */ public function testRunStopped($elapsedTime); /** - * @param string $testName - * @access public - */ + * @param string $testName + * @access public + */ public function testStarted($testName); /** - * @param string $testName - * @access public - */ + * @param string $testName + * @access public + */ public function testEnded($testName); /** - * @param integer $status - * @param string $testName - * @param string $trace - * @access public - */ + * @param integer $status + * @param string $testName + * @param string $trace + * @access public + */ public function testFailed($status, $testName, $trace); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/TestSuiteLoader.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Runner/TestSuiteLoader.php diff -u pear/PHPUnit2/Runner/TestSuiteLoader.php:1.10 pear/PHPUnit2/Runner/TestSuiteLoader.php:1.11 --- pear/PHPUnit2/Runner/TestSuiteLoader.php:1.10 Sat Apr 30 10:52:46 2005 +++ pear/PHPUnit2/Runner/TestSuiteLoader.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestSuiteLoader.php,v 1.10 2005/04/30 14:52:46 sebastian Exp $ + * @version CVS: $Id: TestSuiteLoader.php,v 1.11 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,18 +34,18 @@ */ interface PHPUnit2_Runner_TestSuiteLoader { /** - * @param string $suiteClassName - * @param string $suiteClassFile - * @return ReflectionClass - * @access public - */ + * @param string $suiteClassName + * @param string $suiteClassFile + * @return ReflectionClass + * @access public + */ public function load($suiteClassName, $suiteClassFile = ''); /** - * @param ReflectionClass $aClass - * @return ReflectionClass - * @access public - */ + * @param ReflectionClass $aClass + * @return ReflectionClass + * @access public + */ public function reload(ReflectionClass $aClass); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/Version.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit2/Runner/Version.php diff -u pear/PHPUnit2/Runner/Version.php:1.6 pear/PHPUnit2/Runner/Version.php:1.7 --- pear/PHPUnit2/Runner/Version.php:1.6 Mon Apr 11 02:41:36 2005 +++ pear/PHPUnit2/Runner/Version.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Version.php,v 1.6 2005/04/11 06:41:36 sebastian Exp $ + * @version CVS: $Id: Version.php,v 1.7 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,21 +34,21 @@ */ class PHPUnit2_Runner_Version { /** - * Returns the current version of PHPUnit. - * - * @return string - * @access public - * @static - */ + * Returns the current version of PHPUnit. + * + * @return string + * @access public + * @static + */ public static function id() { return '@package_version@'; } /** - * @return string - * @access public - * @static - */ + * @return string + * @access public + * @static + */ public static function getVersionString() { return 'PHPUnit @package_version@ by Sebastian Bergmann.'; } http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/ResultPrinter.php?r1=1.18&r2=1.19&ty=u Index: pear/PHPUnit2/TextUI/ResultPrinter.php diff -u pear/PHPUnit2/TextUI/ResultPrinter.php:1.18 pear/PHPUnit2/TextUI/ResultPrinter.php:1.19 --- pear/PHPUnit2/TextUI/ResultPrinter.php:1.18 Tue Apr 26 06:56:33 2005 +++ pear/PHPUnit2/TextUI/ResultPrinter.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ResultPrinter.php,v 1.18 2005/04/26 10:56:33 sebastian Exp $ + * @version CVS: $Id: ResultPrinter.php,v 1.19 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,22 +36,22 @@ */ class PHPUnit2_TextUI_ResultPrinter extends PHPUnit2_Util_Printer implements PHPUnit2_Framework_TestListener { /** - * @var integer - * @access private - */ + * @var integer + * @access private + */ private $column = 0; /** - * @var boolean - * @access private - */ + * @var boolean + * @access private + */ private $lastTestFailed = FALSE; /** - * @param PHPUnit2_Framework_TestResult $result - * @param float $runTime - * @access public - */ + * @param PHPUnit2_Framework_TestResult $result + * @param float $runTime + * @access public + */ public function printResult(PHPUnit2_Framework_TestResult $result, $timeElapsed) { $this->printHeader($timeElapsed); $this->printErrors($result); @@ -61,11 +61,11 @@ } /** - * @param array $defects - * @param integer $count - * @param string $type - * @access protected - */ + * @param array $defects + * @param integer $count + * @param string $type + * @access protected + */ protected function printDefects($defects, $count, $type) { if ($count == 0) { return; @@ -90,20 +90,20 @@ } /** - * @param PHPUnit2_Framework_TestFailure $defect - * @param integer $count - * @access protected - */ + * @param PHPUnit2_Framework_TestFailure $defect + * @param integer $count + * @access protected + */ protected function printDefect(PHPUnit2_Framework_TestFailure $defect, $count) { $this->printDefectHeader($defect, $count); $this->printDefectTrace($defect); } /** - * @param PHPUnit2_Framework_TestFailure $defect - * @param integer $count - * @access protected - */ + * @param PHPUnit2_Framework_TestFailure $defect + * @param integer $count + * @access protected + */ protected function printDefectHeader(PHPUnit2_Framework_TestFailure $defect, $count) { $this->write( sprintf( @@ -116,9 +116,9 @@ } /** - * @param PHPUnit2_Framework_TestFailure $defect - * @access protected - */ + * @param PHPUnit2_Framework_TestFailure $defect + * @access protected + */ protected function printDefectTrace(PHPUnit2_Framework_TestFailure $defect) { $e = $defect->thrownException(); $message = method_exists($e, 'toString') ? $e->toString() : $e->getMessage(); @@ -133,33 +133,33 @@ } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printErrors(PHPUnit2_Framework_TestResult $result) { $this->printDefects($result->errors(), $result->errorCount(), 'error'); } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printFailures(PHPUnit2_Framework_TestResult $result) { $this->printDefects($result->failures(), $result->failureCount(), 'failure'); } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printIncompletes(PHPUnit2_Framework_TestResult $result) { $this->printDefects($result->notImplemented(), $result->notImplementedCount(), 'incomplete testcase'); } /** - * @param float $timeElapsed - * @access protected - */ + * @param float $timeElapsed + * @access protected + */ protected function printHeader($timeElapsed) { $this->write( sprintf( @@ -171,9 +171,9 @@ } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printFooter(PHPUnit2_Framework_TestResult $result) { if ($result->allCompletlyImplemented() && $result->wasSuccessful()) { @@ -214,19 +214,19 @@ } /** - * @access public - */ + * @access public + */ public function printWaitPrompt() { $this->write("\n<RETURN> to continue\n"); } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->write('E'); $this->nextColumn(); @@ -235,12 +235,12 @@ } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->write('F'); $this->nextColumn(); @@ -249,12 +249,12 @@ } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->write('I'); $this->nextColumn(); @@ -263,40 +263,40 @@ } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { if (!$this->lastTestFailed) { $this->write('.'); @@ -307,8 +307,8 @@ } /** - * @access private - */ + * @access private + */ private function nextColumn() { if ($this->column++ >= 40) { $this->column = 0; http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/TestRunner.php?r1=1.60&r2=1.61&ty=u Index: pear/PHPUnit2/TextUI/TestRunner.php diff -u pear/PHPUnit2/TextUI/TestRunner.php:1.60 pear/PHPUnit2/TextUI/TestRunner.php:1.61 --- pear/PHPUnit2/TextUI/TestRunner.php:1.60 Tue May 24 05:43:36 2005 +++ pear/PHPUnit2/TextUI/TestRunner.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestRunner.php,v 1.60 2005/05/24 09:43:36 sebastian Exp $ + * @version CVS: $Id: TestRunner.php,v 1.61 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -48,28 +48,28 @@ const EXCEPTION_EXIT = 2; /** - * @var PHPUnit2_Runner_TestSuiteLoader - * @access private - */ + * @var PHPUnit2_Runner_TestSuiteLoader + * @access private + */ private $loader = NULL; /** - * @var PHPUnit2_TextUI_ResultPrinter - * @access private - */ + * @var PHPUnit2_TextUI_ResultPrinter + * @access private + */ private $printer = NULL; /** - * @var boolean - * @access private - * @static - */ + * @var boolean + * @access private + * @static + */ private static $versionStringPrinted = FALSE; /** - * @access public - * @static - */ + * @access public + * @static + */ public static function main() { $aTestRunner = new PHPUnit2_TextUI_TestRunner; @@ -91,10 +91,10 @@ } /** - * @param array $arguments - * @throws RuntimeException - * @access protected - */ + * @param array $arguments + * @throws RuntimeException + * @access protected + */ protected function start($arguments) { $coverageDataFile = FALSE; $coverageHTMLFile = FALSE; @@ -268,15 +268,15 @@ } /** - * @param mixed $test - * @param mixed $coverageDataFile - * @param mixed $testdoxHTMLFile - * @param mixed $testdoxTextFile - * @param mixed $xmlLogfile - * @param boolean $wait - * @access public - * @static - */ + * @param mixed $test + * @param mixed $coverageDataFile + * @param mixed $testdoxHTMLFile + * @param mixed $testdoxTextFile + * @param mixed $xmlLogfile + * @param boolean $wait + * @access public + * @static + */ public static function run($test, $coverageDataFile = FALSE, $coverageHTMLFile = FALSE, $coverageTextFile = FALSE, $testdoxHTMLFile = FALSE, $testdoxTextFile = FALSE, $xmlLogfile = FALSE, $wait = FALSE) { if ($test instanceof ReflectionClass) { $test = new PHPUnit2_Framework_TestSuite($test); @@ -299,12 +299,12 @@ } /** - * Runs a single test and waits until the user types RETURN. - * - * @param PHPUnit2_Framework_Test $suite - * @access public - * @static - */ + * Runs a single test and waits until the user types RETURN. + * + * @param PHPUnit2_Framework_Test $suite + * @access public + * @static + */ public static function runAndWait(PHPUnit2_Framework_Test $suite) { $aTestRunner = new PHPUnit2_TextUI_TestRunner; @@ -321,25 +321,25 @@ } /** - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createTestResult() { return new PHPUnit2_Framework_TestResult; } /** - * @param PHPUnit2_Framework_Test $suite - * @param mixed $coverageDataFile - * @param mixed $coverageHTMLFile - * @param mixed $coverageTextFile - * @param mixed $testdoxHTMLFile - * @param mixed $testdoxTextFile - * @param mixed $xmlLogfile - * @param boolean $wait - * @return PHPUnit2_Framework_TestResult - * @access public - */ + * @param PHPUnit2_Framework_Test $suite + * @param mixed $coverageDataFile + * @param mixed $coverageHTMLFile + * @param mixed $coverageTextFile + * @param mixed $testdoxHTMLFile + * @param mixed $testdoxTextFile + * @param mixed $xmlLogfile + * @param boolean $wait + * @return PHPUnit2_Framework_TestResult + * @access public + */ public function doRun(PHPUnit2_Framework_Test $suite, $coverageDataFile = FALSE, $coverageHTMLFile = FALSE, $coverageTextFile = FALSE, $testdoxHTMLFile = FALSE, $testdoxTextFile = FALSE, $xmlLogfile = FALSE, $wait = FALSE) { $result = $this->createTestResult(); $timer = new Benchmark_Timer; @@ -404,12 +404,12 @@ } /** - * Returns the loader to be used. - * - * @return PHPUnit2_Runner_TestSuiteLoader - * @access public - * @since Method available since Release 2.2.0 - */ + * Returns the loader to be used. + * + * @return PHPUnit2_Runner_TestSuiteLoader + * @access public + * @since Method available since Release 2.2.0 + */ public function getLoader() { if ($this->loader === NULL) { $this->loader = new PHPUnit2_Runner_StandardTestSuiteLoader; @@ -419,13 +419,13 @@ } /** - * @param PHPUnit2_Framework_TestResult $result - * @param mixed $coverageDataFile - * @param mixed $coverageHTMLFile - * @param mixed $coverageTextFile - * @access protected - * @since Method available since Release 2.1.0 - */ + * @param PHPUnit2_Framework_TestResult $result + * @param mixed $coverageDataFile + * @param mixed $coverageHTMLFile + * @param mixed $coverageTextFile + * @access protected + * @since Method available since Release 2.1.0 + */ protected function handleCodeCoverageInformation(PHPUnit2_Framework_TestResult $result, $coverageDataFile, $coverageHTMLFile, $coverageTextFile) { if ($coverageDataFile !== FALSE && $fp = fopen($coverageDataFile, 'w')) { @@ -453,8 +453,8 @@ } /** - * @access public - */ + * @access public + */ public function showError($message) { self::printVersionString(); print $message . "\n"; @@ -463,8 +463,8 @@ } /** - * @access public - */ + * @access public + */ public function showHelp() { self::printVersionString(); print "Usage: phpunit [switches] UnitTest [UnitTest.php]\n"; @@ -487,9 +487,9 @@ } /** - * @param boolean $wait - * @access protected - */ + * @param boolean $wait + * @access protected + */ protected function pause($wait) { if (!$wait) { return; @@ -501,49 +501,49 @@ } /** - * @param PHPUnit2_TextUI_ResultPrinter $resultPrinter - * @access public - */ + * @param PHPUnit2_TextUI_ResultPrinter $resultPrinter + * @access public + */ public function setPrinter(PHPUnit2_TextUI_ResultPrinter $resultPrinter) { $this->printer = $resultPrinter; } /** - * A test started. - * - * @param string $testName - * @access public - */ + * A test started. + * + * @param string $testName + * @access public + */ public function testStarted($testName) { } /** - * A test ended. - * - * @param string $testName - * @access public - */ + * A test ended. + * + * @param string $testName + * @access public + */ public function testEnded($testName) { } /** - * A test failed. - * - * @param integer $status - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A test failed. + * + * @param integer $status + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function testFailed($status, PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { } /** - * Override to define how to handle a failed loading of - * a test suite. - * - * @param string $message - * @access protected - */ + * Override to define how to handle a failed loading of + * a test suite. + * + * @param string $message + * @access protected + */ protected function runFailed($message) { self::printVersionString(); print $message; @@ -551,9 +551,9 @@ } /** - * @access private - * @since Method available since Release 2.2.0 - */ + * @access private + * @since Method available since Release 2.2.0 + */ private static function printVersionString() { if (!self::$versionStringPrinted) { print PHPUnit2_Runner_Version::getVersionString() . "\n\n"; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Filter.php?r1=1.30&r2=1.31&ty=u Index: pear/PHPUnit2/Util/Filter.php diff -u pear/PHPUnit2/Util/Filter.php:1.30 pear/PHPUnit2/Util/Filter.php:1.31 --- pear/PHPUnit2/Util/Filter.php:1.30 Thu May 26 04:45:47 2005 +++ pear/PHPUnit2/Util/Filter.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Filter.php,v 1.30 2005/05/26 08:45:47 sebastian Exp $ + * @version CVS: $Id: Filter.php,v 1.31 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,12 +34,12 @@ */ class PHPUnit2_Util_Filter { /** - * Source files that are to be filtered. - * - * @var array - * @access protected - * @static - */ + * Source files that are to be filtered. + * + * @var array + * @access protected + * @static + */ protected static $filteredFiles = array( 'PHPUnit2/Extensions/ExceptionTestCase.php', 'PHPUnit2/Extensions/PerformanceTestCase.php', @@ -102,13 +102,13 @@ ); /** - * Adds a new file to be filtered. - * - * @param string - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Adds a new file to be filtered. + * + * @param string + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function addFileToFilter($filename) { $filename = self::getCanonicalFilename($filename); @@ -118,13 +118,13 @@ } /** - * Removes a file from the filter. - * - * @param string - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Removes a file from the filter. + * + * @param string + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function removeFileFromFilter($filename) { $filename = self::getCanonicalFilename($filename); $keys = array_keys(self::$filteredFiles); @@ -138,13 +138,13 @@ } /** - * Filters source lines from PHPUnit classes. - * - * @param array - * @return array - * @access public - * @static - */ + * Filters source lines from PHPUnit classes. + * + * @param array + * @return array + * @access public + * @static + */ public static function getFilteredCodeCoverage($codeCoverageInformation) { $files = array_keys($codeCoverageInformation); @@ -158,13 +158,13 @@ } /** - * Filters stack frames from PHPUnit classes. - * - * @param Exception $e - * @return string - * @access public - * @static - */ + * Filters stack frames from PHPUnit classes. + * + * @param Exception $e + * @return string + * @access public + * @static + */ public static function getFilteredStacktrace(Exception $e) { $filteredStacktrace = ''; $stacktrace = $e->getTrace(); @@ -186,13 +186,13 @@ } /** - * Canonicalizes a source file name. - * - * @param string $filename - * @return string - * @access protected - * @static - */ + * Canonicalizes a source file name. + * + * @param string $filename + * @return string + * @access protected + * @static + */ protected static function getCanonicalFilename($filename) { foreach (array('PHPUnit2', 'Benchmark', 'Console', 'PEAR') as $package) { $pos = strpos($filename, $package); @@ -211,12 +211,12 @@ } /** - * @param string $filename - * @return boolean - * @access protected - * @static - * @since Method available since Release 2.1.3 - */ + * @param string $filename + * @return boolean + * @access protected + * @static + * @since Method available since Release 2.1.3 + */ protected static function isFiltered($filename) { if (substr($filename, -7) == 'phpunit' || in_array(self::getCanonicalFilename($filename), self::$filteredFiles)) { http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Printer.php?r1=1.9&r2=1.10&ty=u Index: pear/PHPUnit2/Util/Printer.php diff -u pear/PHPUnit2/Util/Printer.php:1.9 pear/PHPUnit2/Util/Printer.php:1.10 --- pear/PHPUnit2/Util/Printer.php:1.9 Mon Apr 11 03:45:33 2005 +++ pear/PHPUnit2/Util/Printer.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Printer.php,v 1.9 2005/04/11 07:45:33 sebastian Exp $ + * @version CVS: $Id: Printer.php,v 1.10 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -35,17 +35,17 @@ */ abstract class PHPUnit2_Util_Printer { /** - * @var resource - * @access private - */ + * @var resource + * @access private + */ private $out; /** - * Constructor. - * - * @param mixed $out - * @access public - */ + * Constructor. + * + * @param mixed $out + * @access public + */ public function __construct($out = NULL) { if ($out === NULL) { $this->out = fopen('php://stdout', 'r'); @@ -61,18 +61,18 @@ } /** - * Destructor. - * - * @access public - */ + * Destructor. + * + * @access public + */ public function __destruct() { fclose($this->out); } /** - * @param string $buffer - * @access public - */ + * @param string $buffer + * @access public + */ public function write($buffer) { fputs($this->out, $buffer); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Skeleton.php?r1=1.21&r2=1.22&ty=u Index: pear/PHPUnit2/Util/Skeleton.php diff -u pear/PHPUnit2/Util/Skeleton.php:1.21 pear/PHPUnit2/Util/Skeleton.php:1.22 --- pear/PHPUnit2/Util/Skeleton.php:1.21 Sat Apr 16 13:16:37 2005 +++ pear/PHPUnit2/Util/Skeleton.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Skeleton.php,v 1.21 2005/04/16 17:16:37 sebastian Exp $ + * @version CVS: $Id: Skeleton.php,v 1.22 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -72,31 +72,31 @@ */ class {className}Test extends PHPUnit2_Framework_TestCase { /** - * Runs the test methods of this class. - * - * @access public - * @static - */ + * Runs the test methods of this class. + * + * @access public + * @static + */ public static function main() { $suite = new PHPUnit2_Framework_TestSuite("{className}Test"); $result = PHPUnit2_TextUI_TestRunner::run($suite); } /** - * Sets up the fixture, for example, open a network connection. - * This method is called before a test is executed. - * - * @access protected - */ + * Sets up the fixture, for example, open a network connection. + * This method is called before a test is executed. + * + * @access protected + */ protected function setUp() { } /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - * - * @access protected - */ + * Tears down the fixture, for example, close a network connection. + * This method is called after a test is executed. + * + * @access protected + */ protected function tearDown() { } '; @@ -114,8 +114,8 @@ protected $templateMethod = ' /** - * @todo Implement test{methodName}(). - */ + * @todo Implement test{methodName}(). + */ public function test{methodName}() { // Remove the following line when you implement this test. throw new PHPUnit2_Framework_IncompleteTestError; @@ -123,25 +123,25 @@ '; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $className; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $classSourceFile; /** - * Constructor. - * - * @param string $className - * @param string $classSourceFile - * @throws RuntimeException - * @access public - */ + * Constructor. + * + * @param string $className + * @param string $classSourceFile + * @throws RuntimeException + * @access public + */ public function __construct($className, $classSourceFile = '') { if ($classSourceFile == '') { $classSourceFile = $className . '.php'; @@ -163,11 +163,11 @@ } /** - * Generates the test class' source. - * - * @return string - * @access public - */ + * Generates the test class' source. + * + * @return string + * @access public + */ public function generate() { $testClassSource = $this->testClassHeader($this->className, $this->classSourceFile); @@ -189,11 +189,11 @@ } /** - * Generates the test class and writes it to a source file. - * - * @param string $file - * @access public - */ + * Generates the test class and writes it to a source file. + * + * @param string $file + * @access public + */ public function write($file = '') { if ($file == '') { $file = $this->className . 'Test.php'; @@ -206,14 +206,14 @@ } /** - * Sets the templates for class header, class footer, and method. - * - * @param string $classHeader - * @param string $classFooter - * @param string $method - * @access public - * @since Method available since Release 2.2.0 - */ + * Sets the templates for class header, class footer, and method. + * + * @param string $classHeader + * @param string $classFooter + * @param string $method + * @access public + * @since Method available since Release 2.2.0 + */ public function setTemplates($classHeader, $classFooter, $method) { if (is_file($classHeader)) { $this->templateClassHeader = file_get_contents($classHeader); @@ -235,10 +235,10 @@ } /** - * @param string $className - * @param string $classSourceFile - * @access protected - */ + * @param string $className + * @param string $classSourceFile + * @access protected + */ protected function testClassHeader($className, $classSourceFile) { return str_replace( array( @@ -258,9 +258,9 @@ } /** - * @param string $className - * @access protected - */ + * @param string $className + * @access protected + */ protected function testClassFooter($className) { return str_replace( array( @@ -274,9 +274,9 @@ } /** - * @param string $methodName - * @access protected - */ + * @param string $methodName + * @access protected + */ protected function testMethod($methodName) { return str_replace( array( http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer.php?r1=1.7&r2=1.8&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.7 pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8 --- pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.7 Tue May 24 05:43:36 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Renderer.php,v 1.7 2005/05/24 09:43:36 sebastian Exp $ + * @version CVS: $Id: Renderer.php,v 1.8 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -37,48 +37,48 @@ */ abstract class PHPUnit2_Util_CodeCoverage_Renderer { /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $codeCoverageInformation; /** - * @var boolean - * @access protected - */ + * @var boolean + * @access protected + */ protected $useSummary = TRUE; /** - * Constructor. - * - * @param array $codeCoverageInformation - * @access protected - */ + * Constructor. + * + * @param array $codeCoverageInformation + * @access protected + */ protected function __construct($codeCoverageInformation) { $this->codeCoverageInformation = $codeCoverageInformation; } /** - * Abstract Factory. - * - * @param string $rendererName - * @param array $codeCoverageInformation - * @throws RuntimeException - * @access public - */ + * Abstract Factory. + * + * @param string $rendererName + * @param array $codeCoverageInformation + * @throws RuntimeException + * @access public + */ public function factory($rendererName, $codeCoverageInformation) { $class = 'PHPUnit2_Util_CodeCoverage_Renderer_' . $rendererName; return new $class($codeCoverageInformation); } /** - * Visualizes the result array of - * PHPUnit2_Framework_TestResult::getCodeCoverageInformation(). - * - * @return string - * @access public - * @final - */ + * Visualizes the result array of + * PHPUnit2_Framework_TestResult::getCodeCoverageInformation(). + * + * @return string + * @access public + * @final + */ public final function render() { $buffer = $this->header(); @@ -95,14 +95,14 @@ } /** - * Visualizes the result array of - * PHPUnit2_Framework_TestResult::getCodeCoverageInformation() - * and writes it to a file. - * - * @param string $filename - * @access public - * @since Method available since Release 2.2.0 - */ + * Visualizes the result array of + * PHPUnit2_Framework_TestResult::getCodeCoverageInformation() + * and writes it to a file. + * + * @param string $filename + * @access public + * @since Method available since Release 2.2.0 + */ public function renderToFile($filename) { if ($fp = fopen($filename, 'w')) { fputs( @@ -115,25 +115,25 @@ } /** - * Returns summarized Code Coverage data. - * - * Format of the result array: - * - * <code> - * array( - * "/tested/code.php" => array( - * linenumber => flag - * ) - * ) - * </code> - * - * flag > 1: line was executed. - * flag < 1: line is executable but was not executed. - * - * @return array - * @access protected - * @since Method available since Release 2.2.0 - */ + * Returns summarized Code Coverage data. + * + * Format of the result array: + * + * <code> + * array( + * "/tested/code.php" => array( + * linenumber => flag + * ) + * ) + * </code> + * + * flag > 1: line was executed. + * flag < 1: line is executable but was not executed. + * + * @return array + * @access protected + * @since Method available since Release 2.2.0 + */ protected function getSummary() { $summary = array(); @@ -155,44 +155,44 @@ } /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function header() { } /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function footer() { } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function startSourceFile($sourceFile) { } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function endSourceFile($sourceFile) { } /** - * @param array $codeLines - * @param array $executedLines - * @return string - * @access protected - * @abstract - */ + * @param array $codeLines + * @param array $executedLines + * @return string + * @access protected + * @abstract + */ abstract protected function renderSourceFile($codeLines, $executedLines); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php:1.6 pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php:1.7 --- pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php:1.6 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: HTML.php,v 1.6 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: HTML.php,v 1.7 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -84,47 +84,47 @@ '; /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function header() { return self::pageHeader; } /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function footer() { return self::pageFooter; } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function startSourceFile($sourceFile) { return self::sourceFileHeader; } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function endSourceFile($sourceFile) { return self::sourceFileFooter; } /** - * @param array $codeLines - * @param array $executedLines - * @return string - * @access protected - */ + * @param array $codeLines + * @param array $executedLines + * @return string + * @access protected + */ protected function renderSourceFile($codeLines, $executedLines) { $buffer = ''; $line = 1; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php?r1=1.5&r2=1.6&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.5 pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.6 --- pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.5 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Text.php,v 1.5 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: Text.php,v 1.6 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -36,29 +36,29 @@ */ class PHPUnit2_Util_CodeCoverage_Renderer_Text extends PHPUnit2_Util_CodeCoverage_Renderer { /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function startSourceFile($sourceFile) { return ' ' . $sourceFile . "\n\n"; } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function endSourceFile($sourceFile) { return "\n"; } /** - * @param array $codeLines - * @param array $executedLines - * @return string - * @access protected - */ + * @param array $codeLines + * @param array $executedLines + * @return string + * @access protected + */ protected function renderSourceFile($codeLines, $executedLines) { $buffer = ''; $line = 1; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Log/PEAR.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/Log/PEAR.php diff -u pear/PHPUnit2/Util/Log/PEAR.php:1.1 pear/PHPUnit2/Util/Log/PEAR.php:1.2 --- pear/PHPUnit2/Util/Log/PEAR.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/Log/PEAR.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PEAR.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: PEAR.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -38,38 +38,38 @@ */ class PHPUnit2_Util_Log_PEAR implements PHPUnit2_Framework_TestListener { /** - * Log. - * - * @var Log - * @access private - */ + * Log. + * + * @var Log + * @access private + */ private $log; /** - * @param string $type The type of concrete Log subclass to use. - * Currently, valid values are 'console', - * 'syslog', 'sql', 'file', and 'mcal'. - * @param string $name The name of the actually log file, table, or - * other specific store to use. Defaults to an - * empty string, with which the subclass will - * attempt to do something intelligent. - * @param string $ident The identity reported to the log system. - * @param array $conf A hash containing any additional configuration - * information that a subclass might need. - * @param int $maxLevel Maximum priority level at which to log. - * @access public - */ + * @param string $type The type of concrete Log subclass to use. + * Currently, valid values are 'console', + * 'syslog', 'sql', 'file', and 'mcal'. + * @param string $name The name of the actually log file, table, or + * other specific store to use. Defaults to an + * empty string, with which the subclass will + * attempt to do something intelligent. + * @param string $ident The identity reported to the log system. + * @param array $conf A hash containing any additional configuration + * information that a subclass might need. + * @param int $maxLevel Maximum priority level at which to log. + * @access public + */ public function __construct($type, $name = '', $ident = '', $conf = array(), $maxLevel = PEAR_LOG_DEBUG) { $this->log = Log::factory($type, $name, $ident, $conf, $maxLevel); } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->log->crit( sprintf( @@ -82,12 +82,12 @@ } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->log->err( sprintf( @@ -100,12 +100,12 @@ } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->log->info( sprintf( @@ -118,12 +118,12 @@ } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { $this->log->info( sprintf( @@ -135,12 +135,12 @@ } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { $this->log->info( sprintf( @@ -152,11 +152,11 @@ } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $this->log->info( sprintf( @@ -168,11 +168,11 @@ } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $this->log->info( sprintf( http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Log/XML.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/Log/XML.php diff -u pear/PHPUnit2/Util/Log/XML.php:1.1 pear/PHPUnit2/Util/Log/XML.php:1.2 --- pear/PHPUnit2/Util/Log/XML.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/Log/XML.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: XML.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: XML.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -38,77 +38,77 @@ */ class PHPUnit2_Util_Log_XML extends PHPUnit2_Util_Printer implements PHPUnit2_Framework_TestListener { /** - * @var DOMDocument - * @access private - */ + * @var DOMDocument + * @access private + */ private $document; /** - * @var DOMElement - * @access private - */ + * @var DOMElement + * @access private + */ private $root; /** - * @var boolean - * @access private - */ + * @var boolean + * @access private + */ private $writeDocument = TRUE; /** - * @var DOMElement[] - * @access private - */ + * @var DOMElement[] + * @access private + */ private $testSuites = array(); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteTests = array(0); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteErrors = array(0); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteFailures = array(0); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteTimes = array(0); /** - * @var integer - * @access private - */ + * @var integer + * @access private + */ private $testSuiteLevel = 0; /** - * @var DOMElement - * @access private - */ + * @var DOMElement + * @access private + */ private $currentTestCase = NULL; /** - * @var Benchmark_Timer - * @access private - */ + * @var Benchmark_Timer + * @access private + */ private $timer; /** - * Constructor. - * - * @param mixed $out - * @access public - */ + * Constructor. + * + * @param mixed $out + * @access public + */ public function __construct($out = NULL) { $this->document = new DOMDocument('1.0', 'UTF-8'); $this->document->formatOutput = TRUE; @@ -122,10 +122,10 @@ } /** - * Destructor. - * - * @access public - */ + * Destructor. + * + * @access public + */ public function __destruct() { if ($this->writeDocument === TRUE) { $this->write($this->getXML()); @@ -135,12 +135,12 @@ } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $error = $this->document->createElement('error', PHPUnit2_Util_Filter::getFilteredStacktrace($e)); $error->setAttribute('message', $e->getMessage()); @@ -152,12 +152,12 @@ } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $failure = $this->document->createElement('failure', PHPUnit2_Util_Filter::getFilteredStacktrace($e)); $failure->setAttribute('message', $e->getMessage()); @@ -169,12 +169,12 @@ } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $error = $this->document->createElement('error', PHPUnit2_Util_Filter::getFilteredStacktrace($e)); $error->setAttribute('message', 'Incomplete Test'); @@ -186,12 +186,12 @@ } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { $testSuite = $this->document->createElement('testsuite'); $testSuite->setAttribute('name', $suite->getName()); @@ -231,12 +231,12 @@ } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { $this->testSuites[$this->testSuiteLevel]->setAttribute('tests', $this->testSuiteTests[$this->testSuiteLevel]); $this->testSuites[$this->testSuiteLevel]->setAttribute('failures', $this->testSuiteFailures[$this->testSuiteLevel]); @@ -254,11 +254,11 @@ } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $testCase = $this->document->createElement('testcase'); $testCase->setAttribute('name', $test->getName()); @@ -273,11 +273,11 @@ } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $this->timer->stop(); $time = $this->timer->timeElapsed(); @@ -289,27 +289,27 @@ } /** - * Returns the XML as a string. - * - * @return string - * @access public - * @since Method available since Release 2.2.0 - */ + * Returns the XML as a string. + * + * @return string + * @access public + * @since Method available since Release 2.2.0 + */ public function getXML() { return $this->document->saveXML(); } /** - * Enables or disables the writing of the document - * in __destruct(). - * - * This is a "hack" needed for the integration of - * PHPUnit with Phing. - * - * @return string - * @access public - * @since Method available since Release 2.2.0 - */ + * Enables or disables the writing of the document + * in __destruct(). + * + * This is a "hack" needed for the integration of + * PHPUnit with Phing. + * + * @return string + * @access public + * @since Method available since Release 2.2.0 + */ public function setWriteDocument($flag) { if (is_bool($flag)) { $this->writeDocument = $flag; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/NamePrettifier.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/NamePrettifier.php diff -u pear/PHPUnit2/Util/TestDox/NamePrettifier.php:1.1 pear/PHPUnit2/Util/TestDox/NamePrettifier.php:1.2 --- pear/PHPUnit2/Util/TestDox/NamePrettifier.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/NamePrettifier.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: NamePrettifier.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: NamePrettifier.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -34,24 +34,24 @@ */ class PHPUnit2_Util_TestDox_NamePrettifier { /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $prefix = 'Test'; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $suffix = 'Test'; /** - * Tests if a method is a test method. - * - * @param string $testMethodName - * @return boolean - * @access public - */ + * Tests if a method is a test method. + * + * @param string $testMethodName + * @return boolean + * @access public + */ public function isATestMethod($testMethodName) { if (substr($testMethodName, 0, 4) == 'test') { return TRUE; @@ -61,12 +61,12 @@ } /** - * Prettifies the name of a test class. - * - * @param string $testClassName - * @return string - * @access public - */ + * Prettifies the name of a test class. + * + * @param string $testClassName + * @return string + * @access public + */ public function prettifyTestClass($testClassName) { $title = $testClassName; @@ -84,12 +84,12 @@ } /** - * Prettifies the name of a test method. - * - * @param string $testMethodName - * @return string - * @access public - */ + * Prettifies the name of a test method. + * + * @param string $testMethodName + * @return string + * @access public + */ public function prettifyTestMethod($testMethodName) { $buffer = ''; @@ -109,21 +109,21 @@ } /** - * Sets the prefix of test names. - * - * @param string $prefix - * @access public - */ + * Sets the prefix of test names. + * + * @param string $prefix + * @access public + */ public function setPrefix($prefix) { $this->prefix = $prefix; } /** - * Sets the suffix of test names. - * - * @param string $prefix - * @access public - */ + * Sets the suffix of test names. + * + * @param string $prefix + * @access public + */ public function setSuffix($suffix) { $this->suffix = $suffix; } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.1 pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ResultPrinter.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: ResultPrinter.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -37,35 +37,35 @@ */ abstract class PHPUnit2_Util_TestDox_ResultPrinter extends PHPUnit2_Util_Printer implements PHPUnit2_Framework_TestListener { /** - * @var PHPUnit2_Util_TestDox_NamePrettifier - * @access protected - */ + * @var PHPUnit2_Util_TestDox_NamePrettifier + * @access protected + */ protected $prettifier; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $testClass = ''; /** - * @var boolean - * @access protected - */ + * @var boolean + * @access protected + */ protected $testFailed = FALSE; /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $tests = array(); /** - * Constructor. - * - * @param resource $out - * @access public - */ + * Constructor. + * + * @param resource $out + * @access public + */ public function __construct($out = NULL) { parent::__construct($out); @@ -74,10 +74,10 @@ } /** - * Destructor. - * - * @access public - */ + * Destructor. + * + * @access public + */ public function __destruct() { $this->doEndClass(); $this->endRun(); @@ -86,78 +86,78 @@ } /** - * Abstract Factory. - * - * @param string $type - * @param resource $out - * @throws RuntimeException - * @access public - * @static - */ + * Abstract Factory. + * + * @param string $type + * @param resource $out + * @throws RuntimeException + * @access public + * @static + */ public static function factory($type, $out = NULL) { $class = 'PHPUnit2_Util_TestDox_ResultPrinter_' . $type; return new $class($out); } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed = TRUE; } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->testFailed = TRUE; } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed = TRUE; } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $class = get_class($test); @@ -176,11 +176,11 @@ } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $prettifiedName = $this->prettifier->prettifyTestMethod($test->getName()); @@ -202,9 +202,9 @@ } /** - * @access private - * @since Method available since Release 2.3.0 - */ + * @access private + * @since Method available since Release 2.3.0 + */ private function doEndClass() { foreach ($this->tests as $name => $data) { if ($data['failures'] == 0) { @@ -216,45 +216,45 @@ } /** - * Handler for 'start run' event. - * - * @access protected - */ + * Handler for 'start run' event. + * + * @access protected + */ protected function startRun() { } /** - * Handler for 'start class' event. - * - * @param string $name - * @access protected - * @abstract - */ + * Handler for 'start class' event. + * + * @param string $name + * @access protected + * @abstract + */ abstract protected function startClass($name); /** - * Handler for 'on test' event. - * - * @param string $name - * @access protected - * @abstract - */ + * Handler for 'on test' event. + * + * @param string $name + * @access protected + * @abstract + */ abstract protected function onTest($name); /** - * Handler for 'end class' event. - * - * @param string $name - * @access protected - * @abstract - */ + * Handler for 'end class' event. + * + * @param string $name + * @access protected + * @abstract + */ abstract protected function endClass($name); /** - * Handler for 'end run' event. - * - * @access protected - */ + * Handler for 'end run' event. + * + * @access protected + */ protected function endRun() { } } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php:1.1 pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php:1.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: HTML.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: HTML.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -36,49 +36,49 @@ */ class PHPUnit2_Util_TestDox_ResultPrinter_HTML extends PHPUnit2_Util_TestDox_ResultPrinter { /** - * Handler for 'start run' event. - * - * @access protected - */ + * Handler for 'start run' event. + * + * @access protected + */ protected function startRun() { $this->write('<html><body>'); } /** - * Handler for 'start class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'start class' event. + * + * @param string $name + * @access protected + */ protected function startClass($name) { $this->write('<h2>' . $name . '</h2><ul>'); } /** - * Handler for 'on test' event. - * - * @param string $name - * @access protected - */ + * Handler for 'on test' event. + * + * @param string $name + * @access protected + */ protected function onTest($name) { $this->write('<li>' . $name . '</li>'); } /** - * Handler for 'end class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'end class' event. + * + * @param string $name + * @access protected + */ protected function endClass($name) { $this->write('</ul>'); } /** - * Handler for 'end run' event. - * - * @access protected - */ + * Handler for 'end run' event. + * + * @access protected + */ protected function endRun() { $this->write('</body></html>'); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php:1.1 pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php:1.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Text.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: Text.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -36,31 +36,31 @@ */ class PHPUnit2_Util_TestDox_ResultPrinter_Text extends PHPUnit2_Util_TestDox_ResultPrinter { /** - * Handler for 'start class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'start class' event. + * + * @param string $name + * @access protected + */ protected function startClass($name) { $this->write($name . "\n"); } /** - * Handler for 'on test' event. - * - * @param string $name - * @access protected - */ + * Handler for 'on test' event. + * + * @param string $name + * @access protected + */ protected function onTest($name) { $this->write(' - ' . $name . "\n"); } /** - * Handler for 'end class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'end class' event. + * + * @param string $name + * @access protected + */ protected function endClass($name) { $this->write("\n"); }
http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/ExceptionTestCase.php?r1=1.14&r2=1.15&ty=u Index: pear/PHPUnit2/Extensions/ExceptionTestCase.php diff -u pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.14 pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15 --- pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.14 Fri May 6 00:18:23 2005 +++ pear/PHPUnit2/Extensions/ExceptionTestCase.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ExceptionTestCase.php,v 1.14 2005/05/06 04:18:23 sebastian Exp $ + * @version CVS: $Id: ExceptionTestCase.php,v 1.15 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,28 +36,28 @@ */ class PHPUnit2_Extensions_ExceptionTestCase extends PHPUnit2_Framework_TestCase { /** - * The name of the expected Exception. - * - * @var string - * @access private - */ + * The name of the expected Exception. + * + * @var string + * @access private + */ private $expectedException = 'Exception'; /** - * @return string - * @access public - * @since Method available since Release 2.2.0 - */ + * @return string + * @access public + * @since Method available since Release 2.2.0 + */ public function getExpectedException() { return $this->expectedException; } /** - * @param string $exceptionName - * @throws InvalidArgumentException - * @access public - * @since Method available since Release 2.2.0 - */ + * @param string $exceptionName + * @throws InvalidArgumentException + * @access public + * @since Method available since Release 2.2.0 + */ public function setExpectedException($exceptionName) { if (is_string($exceptionName) && class_exists($exceptionName)) { $this->expectedException = $exceptionName; @@ -67,8 +67,8 @@ } /** - * @access protected - */ + * @access protected + */ protected function runTest() { try { parent::runTest(); http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/PerformanceTestCase.php?r1=1.14&r2=1.15&ty=u Index: pear/PHPUnit2/Extensions/PerformanceTestCase.php diff -u pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.14 pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15 --- pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.14 Fri May 6 02:32:17 2005 +++ pear/PHPUnit2/Extensions/PerformanceTestCase.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PerformanceTestCase.php,v 1.14 2005/05/06 06:32:17 sebastian Exp $ + * @version CVS: $Id: PerformanceTestCase.php,v 1.15 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -38,14 +38,14 @@ */ class PHPUnit2_Extensions_PerformanceTestCase extends PHPUnit2_Framework_TestCase { /** - * @var float - * @access private - */ + * @var float + * @access private + */ private $maxRunningTime = 0; /** - * @access protected - */ + * @access protected + */ protected function runTest() { $timer = new Benchmark_Timer; @@ -67,11 +67,11 @@ } /** - * @param float $maxRunningTime - * @throws InvalidArgumentException - * @access public - * @since Method available since Release 2.3.0 - */ + * @param float $maxRunningTime + * @throws InvalidArgumentException + * @access public + * @since Method available since Release 2.3.0 + */ public function setMaxRunningTime($maxRunningTime) { if (is_numeric($maxRunningTime) && $maxRunningTime >= 0) { @@ -82,10 +82,10 @@ } /** - * @return float - * @access public - * @since Method available since Release 2.3.0 - */ + * @return float + * @access public + * @since Method available since Release 2.3.0 + */ public function getMaxRunningTime() { return $this->maxRunningTime; } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/RepeatedTest.php?r1=1.14&r2=1.15&ty=u Index: pear/PHPUnit2/Extensions/RepeatedTest.php diff -u pear/PHPUnit2/Extensions/RepeatedTest.php:1.14 pear/PHPUnit2/Extensions/RepeatedTest.php:1.15 --- pear/PHPUnit2/Extensions/RepeatedTest.php:1.14 Tue Apr 26 06:56:30 2005 +++ pear/PHPUnit2/Extensions/RepeatedTest.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: RepeatedTest.php,v 1.14 2005/04/26 10:56:30 sebastian Exp $ + * @version CVS: $Id: RepeatedTest.php,v 1.15 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,19 +36,19 @@ */ class PHPUnit2_Extensions_RepeatedTest extends PHPUnit2_Extensions_TestDecorator { /** - * @var integer - * @access private - */ + * @var integer + * @access private + */ private $timesRepeat = 1; /** - * Constructor. - * - * @param PHPUnit2_Framework_Test $test - * @param integer $timesRepeat - * @throws InvalidArgumentException - * @access public - */ + * Constructor. + * + * @param PHPUnit2_Framework_Test $test + * @param integer $timesRepeat + * @throws InvalidArgumentException + * @access public + */ public function __construct(PHPUnit2_Framework_Test $test, $timesRepeat = 1) { parent::__construct($test); @@ -63,25 +63,25 @@ } /** - * Counts the number of test cases that - * will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that + * will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases() { return $this->timesRepeat * $this->test->countTestCases(); } /** - * Runs the decorated test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the decorated test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestDecorator.php?r1=1.13&r2=1.14&ty=u Index: pear/PHPUnit2/Extensions/TestDecorator.php diff -u pear/PHPUnit2/Extensions/TestDecorator.php:1.13 pear/PHPUnit2/Extensions/TestDecorator.php:1.14 --- pear/PHPUnit2/Extensions/TestDecorator.php:1.13 Tue Apr 26 06:56:30 2005 +++ pear/PHPUnit2/Extensions/TestDecorator.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestDecorator.php,v 1.13 2005/04/26 10:56:30 sebastian Exp $ + * @version CVS: $Id: TestDecorator.php,v 1.14 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -40,84 +40,84 @@ */ class PHPUnit2_Extensions_TestDecorator extends PHPUnit2_Framework_Assert implements PHPUnit2_Framework_Test { /** - * The Test to be decorated. - * - * @var object - * @access protected - */ + * The Test to be decorated. + * + * @var object + * @access protected + */ protected $test = NULL; /** - * Constructor. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Constructor. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function __construct(PHPUnit2_Framework_Test $test) { $this->test = $test; } /** - * Returns a string representation of the test. - * - * @return string - * @access public - */ + * Returns a string representation of the test. + * + * @return string + * @access public + */ public function toString() { return $this->test->toString(); } /** - * Runs the test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @access public - */ + * Runs the test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @access public + */ public function basicRun(PHPUnit2_Framework_TestResult $result) { $this->test->run($result); } /** - * Counts the number of test cases that - * will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that + * will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases() { return $this->test->countTestCases(); } /** - * Creates a default TestResult object. - * - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * Creates a default TestResult object. + * + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createResult() { return new PHPUnit2_Framework_TestResult; } /** - * Returns the test to be run. - * - * @return PHPUnit2_Framework_Test - * @access public - */ + * Returns the test to be run. + * + * @return PHPUnit2_Framework_Test + * @access public + */ public function getTest() { return $this->test; } /** - * Runs the decorated test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the decorated test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestSetup.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit2/Extensions/TestSetup.php diff -u pear/PHPUnit2/Extensions/TestSetup.php:1.12 pear/PHPUnit2/Extensions/TestSetup.php:1.13 --- pear/PHPUnit2/Extensions/TestSetup.php:1.12 Tue Apr 26 06:56:30 2005 +++ pear/PHPUnit2/Extensions/TestSetup.php Thu May 26 12:05:35 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestSetup.php,v 1.12 2005/04/26 10:56:30 sebastian Exp $ + * @version CVS: $Id: TestSetup.php,v 1.13 2005/05/26 16:05:35 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -38,14 +38,14 @@ */ class PHPUnit2_Extensions_TestSetup extends PHPUnit2_Extensions_TestDecorator { /** - * Runs the decorated test and collects the - * result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the decorated test and collects the + * result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); @@ -66,20 +66,20 @@ } /** - * Sets up the fixture. Override to set up additional fixture - * state. - * - * @access protected - */ + * Sets up the fixture. Override to set up additional fixture + * state. + * + * @access protected + */ protected function setUp() { } /** - * Tears down the fixture. Override to tear down the additional - * fixture state. - * - * @access protected - */ + * Tears down the fixture. Override to tear down the additional + * fixture state. + * + * @access protected + */ protected function tearDown() { } } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Assert.php?r1=1.43&r2=1.44&ty=u Index: pear/PHPUnit2/Framework/Assert.php diff -u pear/PHPUnit2/Framework/Assert.php:1.43 pear/PHPUnit2/Framework/Assert.php:1.44 --- pear/PHPUnit2/Framework/Assert.php:1.43 Thu May 26 04:43:14 2005 +++ pear/PHPUnit2/Framework/Assert.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Assert.php,v 1.43 2005/05/26 08:43:14 sebastian Exp $ + * @version CVS: $Id: Assert.php,v 1.44 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -37,58 +37,58 @@ */ class PHPUnit2_Framework_Assert { /** - * @var boolean - * @access private - * @static - */ + * @var boolean + * @access private + * @static + */ private static $looselyTyped = FALSE; /** - * Protect constructor since it is a static only class. - * - * @access protected - */ + * Protect constructor since it is a static only class. + * + * @access protected + */ protected function __construct() { } /** - * Asserts that a haystack contains a needle. - * - * @param mixed $needle - * @param mixed $haystack - * @param string $message - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Asserts that a haystack contains a needle. + * + * @param mixed $needle + * @param mixed $haystack + * @param string $message + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function assertContains($needle, $haystack, $message = '') { self::doAssertContains($needle, $haystack, TRUE, $message); } /** - * Asserts that a haystack does not contain a needle. - * - * @param mixed $needle - * @param mixed $haystack - * @param string $message - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Asserts that a haystack does not contain a needle. + * + * @param mixed $needle + * @param mixed $haystack + * @param string $message + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function assertNotContains($needle, $haystack, $message = '') { self::doAssertContains($needle, $haystack, FALSE, $message); } /** - * @param mixed $needle - * @param mixed $haystack - * @param boolean $condition - * @param string $message - * @throws InvalidArgumentException - * @access private - * @static - * @since Method available since Release 2.2.0 - */ + * @param mixed $needle + * @param mixed $haystack + * @param boolean $condition + * @param string $message + * @throws InvalidArgumentException + * @access private + * @static + * @since Method available since Release 2.2.0 + */ private static function doAssertContains($needle, $haystack, $condition, $message) { $found = FALSE; @@ -140,44 +140,44 @@ } /** - * Asserts that two variables are equal. - * - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @param mixed $delta - * @access public - * @static - */ + * Asserts that two variables are equal. + * + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @param mixed $delta + * @access public + * @static + */ public static function assertEquals($expected, $actual, $message = '', $delta = 0) { self::doAssertEquals($expected, $actual, $delta, TRUE, $message); } /** - * Asserts that two variables are not equal. - * - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @param mixed $delta - * @access public - * @static - * @since Method available since Release 2.3.0 - */ + * Asserts that two variables are not equal. + * + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @param mixed $delta + * @access public + * @static + * @since Method available since Release 2.3.0 + */ public static function assertNotEquals($expected, $actual, $message = '', $delta = 0) { self::doAssertEquals($expected, $actual, $delta, FALSE, $message); } /** - * @param mixed $expected - * @param mixed $actual - * @param mixed $delta - * @param boolean $condition - * @param string $message - * @access private - * @static - * @since Method available since Release 2.3.0 - */ + * @param mixed $expected + * @param mixed $actual + * @param mixed $delta + * @param boolean $condition + * @param string $message + * @access private + * @static + * @since Method available since Release 2.3.0 + */ private static function doAssertEquals($expected, $actual, $delta, $condition, $message) { $equal = FALSE; @@ -221,14 +221,14 @@ } /** - * Asserts that a condition is true. - * - * @param boolean $condition - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that a condition is true. + * + * @param boolean $condition + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertTrue($condition, $message = '') { if (is_bool($condition)) { if (!$condition) { @@ -240,14 +240,14 @@ } /** - * Asserts that a condition is false. - * - * @param boolean $condition - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that a condition is false. + * + * @param boolean $condition + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertFalse($condition, $message = '') { if (is_bool($condition)) { self::assertTrue(!$condition, $message); @@ -257,13 +257,13 @@ } /** - * Asserts that a variable is not NULL. - * - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * Asserts that a variable is not NULL. + * + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function assertNotNull($actual, $message = '') { if (is_null($actual)) { self::fail(self::format('NOT NULL', 'NULL', $message)); @@ -271,13 +271,13 @@ } /** - * Asserts that a variable is NULL. - * - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * Asserts that a variable is NULL. + * + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function assertNull($actual, $message = '') { if (!is_null($actual)) { self::fail(self::format('NULL', 'NOT NULL', $message)); @@ -285,15 +285,15 @@ } /** - * Asserts that two variables reference the same object. - * - * @param object $object - * @param object $object - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that two variables reference the same object. + * + * @param object $object + * @param object $object + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertSame($expected, $actual, $message = '') { if ((is_object($expected) || is_null($expected)) && (is_object($actual) || is_null($actual))) { @@ -306,15 +306,15 @@ } /** - * Asserts that two variables do not reference the same object. - * - * @param object $object - * @param object $object - * @param string $message - * @throws InvalidArgumentException - * @access public - * @static - */ + * Asserts that two variables do not reference the same object. + * + * @param object $object + * @param object $object + * @param string $message + * @throws InvalidArgumentException + * @access public + * @static + */ public static function assertNotSame($expected, $actual, $message = '') { if ((is_object($expected) || is_null($expected)) && (is_object($actual) || is_null($actual))) { @@ -327,41 +327,41 @@ } /** - * Asserts that a variable is of a given type. - * - * @param string $expected - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * Asserts that a variable is of a given type. + * + * @param string $expected + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function assertType($expected, $actual, $message = '') { self::doAssertType($expected, $actual, TRUE, $message); } /** - * Asserts that a variable is not of a given type. - * - * @param string $expected - * @param mixed $actual - * @param string $message - * @access public - * @static - * @since Method available since Release 2.2.0 - */ + * Asserts that a variable is not of a given type. + * + * @param string $expected + * @param mixed $actual + * @param string $message + * @access public + * @static + * @since Method available since Release 2.2.0 + */ public static function assertNotType($expected, $actual, $message = '') { self::doAssertType($expected, $actual, FALSE, $message); } /** - * @param string $expected - * @param mixed $actual - * @param boolean $condition - * @param string $message - * @access private - * @static - * @since Method available since Release 2.2.0 - */ + * @param string $expected + * @param mixed $actual + * @param boolean $condition + * @param string $message + * @access private + * @static + * @since Method available since Release 2.2.0 + */ private static function doAssertType($expected, $actual, $condition, $message) { if (!is_string($expected)) { throw new InvalidArgumentException; @@ -391,41 +391,41 @@ } /** - * Asserts that a string matches a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @access public - * @static - */ + * Asserts that a string matches a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @access public + * @static + */ public static function assertRegExp($pattern, $string, $message = '') { self::doAssertRegExp($pattern, $string, TRUE, $message); } /** - * Asserts that a string does not match a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Asserts that a string does not match a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function assertNotRegExp($pattern, $string, $message = '') { self::doAssertRegExp($pattern, $string, FALSE, $message); } /** - * @param mixed $pattern - * @param mixed $string - * @param boolean $condition - * @param string $message - * @access private - * @static - * @since Method available since Release 2.2.0 - */ + * @param mixed $pattern + * @param mixed $string + * @param boolean $condition + * @param string $message + * @access private + * @static + * @since Method available since Release 2.2.0 + */ private static function doAssertRegExp($pattern, $string, $condition, $message) { if (!is_string($pattern) || !is_string($string)) { throw new InvalidArgumentException; @@ -461,23 +461,23 @@ } /** - * Fails a test with the given message. - * - * @param string $message - * @throws PHPUnit2_Framework_AssertionFailedError - * @access public - * @static - */ + * Fails a test with the given message. + * + * @param string $message + * @throws PHPUnit2_Framework_AssertionFailedError + * @access public + * @static + */ public static function fail($message = '') { throw new PHPUnit2_Framework_AssertionFailedError($message); } /** - * @param string $message - * @throws PHPUnit2_Framework_AssertionFailedError - * @access private - * @static - */ + * @param string $message + * @throws PHPUnit2_Framework_AssertionFailedError + * @access private + * @static + */ private static function failSame($message) { self::fail( sprintf( @@ -490,13 +490,13 @@ } /** - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @throws PHPUnit2_Framework_AssertionFailedError - * @access private - * @static - */ + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @throws PHPUnit2_Framework_AssertionFailedError + * @access private + * @static + */ private static function failNotSame($expected, $actual, $message) { if (is_string($expected) && is_string($actual)) { throw new PHPUnit2_Framework_ComparisonFailure($expected, $actual, $message); @@ -515,12 +515,12 @@ } /** - * @param mixed $expected - * @param mixed $actual - * @param string $message - * @access public - * @static - */ + * @param mixed $expected + * @param mixed $actual + * @param string $message + * @access public + * @static + */ public static function format($expected, $actual, $message) { return sprintf( '%s%sexpected: <%s> but was: <%s>', @@ -533,10 +533,10 @@ } /** - * @param boolean $looselyTyped - * @access public - * @static - */ + * @param boolean $looselyTyped + * @access public + * @static + */ public static function setLooselyTyped($looselyTyped) { if (is_bool($looselyTyped)) { self::$looselyTyped = $looselyTyped; @@ -544,12 +544,12 @@ } /** - * Converts a value to a string. - * - * @param mixed $value - * @access private - * @static - */ + * Converts a value to a string. + * + * @param mixed $value + * @access private + * @static + */ private static function convertToString($value) { foreach ($value as $k => $v) { if (is_array($v)) { @@ -565,11 +565,11 @@ } /** - * @param mixed $object - * @return string - * @access private - * @static - */ + * @param mixed $object + * @return string + * @access private + * @static + */ private static function objectToString($object) { if (is_array($object) || is_object($object)) { $object = serialize($object); @@ -579,13 +579,13 @@ } /** - * Sorts an array recursively by its keys. - * - * @param array $array - * @access private - * @static - * @author Adam Maccabee Trachtenberg <adam@trachtenberg.com> - */ + * Sorts an array recursively by its keys. + * + * @param array $array + * @access private + * @static + * @author Adam Maccabee Trachtenberg <adam@trachtenberg.com> + */ private static function sortArrayRecursively(&$array) { ksort($array); http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/AssertionFailedError.php?r1=1.8&r2=1.9&ty=u Index: pear/PHPUnit2/Framework/AssertionFailedError.php diff -u pear/PHPUnit2/Framework/AssertionFailedError.php:1.8 pear/PHPUnit2/Framework/AssertionFailedError.php:1.9 --- pear/PHPUnit2/Framework/AssertionFailedError.php:1.8 Wed Apr 27 00:51:17 2005 +++ pear/PHPUnit2/Framework/AssertionFailedError.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: AssertionFailedError.php,v 1.8 2005/04/27 04:51:17 sebastian Exp $ + * @version CVS: $Id: AssertionFailedError.php,v 1.9 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,11 +34,11 @@ */ class PHPUnit2_Framework_AssertionFailedError extends Exception { /** - * Wrapper for getMessage() which is declared as final. - * - * @return string - * @access public - */ + * Wrapper for getMessage() which is declared as final. + * + * @return string + * @access public + */ public function toString() { return $this->getMessage(); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/ComparisonFailure.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit2/Framework/ComparisonFailure.php diff -u pear/PHPUnit2/Framework/ComparisonFailure.php:1.12 pear/PHPUnit2/Framework/ComparisonFailure.php:1.13 --- pear/PHPUnit2/Framework/ComparisonFailure.php:1.12 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/ComparisonFailure.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ComparisonFailure.php,v 1.12 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: ComparisonFailure.php,v 1.13 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,25 +36,25 @@ */ class PHPUnit2_Framework_ComparisonFailure extends PHPUnit2_Framework_AssertionFailedError { /** - * @var string - * @access private - */ + * @var string + * @access private + */ private $expected = ''; /** - * @var string - * @access private - */ + * @var string + * @access private + */ private $actual = ''; /** - * Constructs a comparison failure. - * - * @param string $expected - * @param string $actual - * @param string $message - * @access public - */ + * Constructs a comparison failure. + * + * @param string $expected + * @param string $actual + * @param string $message + * @access public + */ public function __construct($expected, $actual, $message = '') { parent::__construct($message); @@ -63,12 +63,12 @@ } /** - * Returns "..." in place of common prefix and "..." in - * place of common suffix between expected and actual. - * - * @return string - * @access public - */ + * Returns "..." in place of common prefix and "..." in + * place of common suffix between expected and actual. + * + * @return string + * @access public + */ public function toString() { $end = min(strlen($this->expected), strlen($this->actual)); $i = 0; http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Error.php?r1=1.3&r2=1.4&ty=u Index: pear/PHPUnit2/Framework/Error.php diff -u pear/PHPUnit2/Framework/Error.php:1.3 pear/PHPUnit2/Framework/Error.php:1.4 --- pear/PHPUnit2/Framework/Error.php:1.3 Mon Apr 11 01:48:08 2005 +++ pear/PHPUnit2/Framework/Error.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Error.php,v 1.3 2005/04/11 05:48:08 sebastian Exp $ + * @version CVS: $Id: Error.php,v 1.4 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.2.0 */ @@ -34,15 +34,15 @@ */ class PHPUnit2_Framework_Error extends Exception { /** - * - * - * @param string $message - * @param integer $code - * @param string $file - * @param integer $line - * @param array $trace - * @access public - */ + * Constructor. + * + * @param string $message + * @param integer $code + * @param string $file + * @param integer $line + * @param array $trace + * @access public + */ public function __construct($message, $code, $file, $line, $trace) { parent::__construct($message, $code); http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Test.php?r1=1.11&r2=1.12&ty=u Index: pear/PHPUnit2/Framework/Test.php diff -u pear/PHPUnit2/Framework/Test.php:1.11 pear/PHPUnit2/Framework/Test.php:1.12 --- pear/PHPUnit2/Framework/Test.php:1.11 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/Test.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Test.php,v 1.11 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: Test.php,v 1.12 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,20 +36,20 @@ */ interface PHPUnit2_Framework_Test { /** - * Counts the number of test cases that will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases(); /** - * Runs a test and collects its result in a TestResult instance. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @access public - */ + * Runs a test and collects its result in a TestResult instance. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @access public + */ public function run($result = NULL); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestCase.php?r1=1.31&r2=1.32&ty=u Index: pear/PHPUnit2/Framework/TestCase.php diff -u pear/PHPUnit2/Framework/TestCase.php:1.31 pear/PHPUnit2/Framework/TestCase.php:1.32 --- pear/PHPUnit2/Framework/TestCase.php:1.31 Mon May 23 00:37:27 2005 +++ pear/PHPUnit2/Framework/TestCase.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestCase.php,v 1.31 2005/05/23 04:37:27 sebastian Exp $ + * @version CVS: $Id: TestCase.php,v 1.32 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -81,19 +81,19 @@ */ abstract class PHPUnit2_Framework_TestCase extends PHPUnit2_Framework_Assert implements PHPUnit2_Framework_Test { /** - * The name of the test case. - * - * @var string - * @access private - */ + * The name of the test case. + * + * @var string + * @access private + */ private $name = NULL; /** - * Constructs a test case with the given name. - * - * @param string - * @access public - */ + * Constructs a test case with the given name. + * + * @param string + * @access public + */ public function __construct($name = NULL) { if ($name !== NULL) { $this->setName($name); @@ -101,11 +101,11 @@ } /** - * Returns a string representation of the test case. - * - * @return string - * @access public - */ + * Returns a string representation of the test case. + * + * @return string + * @access public + */ public function toString() { $class = new ReflectionClass($this); @@ -118,34 +118,34 @@ } /** - * Counts the number of test cases executed by run(TestResult result). - * - * @return integer - * @access public - */ + * Counts the number of test cases executed by run(TestResult result). + * + * @return integer + * @access public + */ public function countTestCases() { return 1; } /** - * Gets the name of a TestCase. - * - * @return string - * @access public - */ + * Gets the name of a TestCase. + * + * @return string + * @access public + */ public function getName() { return $this->name; } /** - * Runs the test case and collects the results in a TestResult object. - * If no TestResult object is passed a new one will be created. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the test case and collects the results in a TestResult object. + * If no TestResult object is passed a new one will be created. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); @@ -164,10 +164,10 @@ } /** - * Runs the bare test sequence. - * - * @access public - */ + * Runs the bare test sequence. + * + * @access public + */ public function runBare() { $catchedException = NULL; @@ -190,11 +190,11 @@ } /** - * Override to run the test and assert its state. - * - * @throws PHPUnit2_Framework_Error - * @access protected - */ + * Override to run the test and assert its state. + * + * @throws PHPUnit2_Framework_Error + * @access protected + */ protected function runTest() { if ($this->name === NULL) { throw new PHPUnit2_Framework_Error( @@ -217,40 +217,40 @@ } /** - * Sets the name of a TestCase. - * - * @param string - * @access public - */ + * Sets the name of a TestCase. + * + * @param string + * @access public + */ public function setName($name) { $this->name = $name; } /** - * Creates a default TestResult object. - * - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * Creates a default TestResult object. + * + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createResult() { return new PHPUnit2_Framework_TestResult; } /** - * Sets up the fixture, for example, open a network connection. - * This method is called before a test is executed. - * - * @access protected - */ + * Sets up the fixture, for example, open a network connection. + * This method is called before a test is executed. + * + * @access protected + */ protected function setUp() { } /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - * - * @access protected - */ + * Tears down the fixture, for example, close a network connection. + * This method is called after a test is executed. + * + * @access protected + */ protected function tearDown() { } } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestFailure.php?r1=1.9&r2=1.10&ty=u Index: pear/PHPUnit2/Framework/TestFailure.php diff -u pear/PHPUnit2/Framework/TestFailure.php:1.9 pear/PHPUnit2/Framework/TestFailure.php:1.10 --- pear/PHPUnit2/Framework/TestFailure.php:1.9 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/TestFailure.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestFailure.php,v 1.9 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: TestFailure.php,v 1.10 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,35 +36,35 @@ */ class PHPUnit2_Framework_TestFailure { /** - * @var PHPUnit2_Framework_Test - * @access protected - */ + * @var PHPUnit2_Framework_Test + * @access protected + */ protected $failedTest; /** - * @var Exception - * @access protected - */ + * @var Exception + * @access protected + */ protected $thrownException; /** - * Constructs a TestFailure with the given test and exception. - * - * @param PHPUnit2_Framework_Test $failedTest - * @param Exception $thrownException - * @access public - */ + * Constructs a TestFailure with the given test and exception. + * + * @param PHPUnit2_Framework_Test $failedTest + * @param Exception $thrownException + * @access public + */ public function __construct(PHPUnit2_Framework_Test $failedTest, Exception $thrownException) { $this->failedTest = $failedTest; $this->thrownException = $thrownException; } /** - * Returns a short description of the failure. - * - * @return string - * @access public - */ + * Returns a short description of the failure. + * + * @return string + * @access public + */ public function toString() { return sprintf( '%s: %s', @@ -75,42 +75,42 @@ } /** - * Gets the failed test. - * - * @return Test - * @access public - */ + * Gets the failed test. + * + * @return Test + * @access public + */ public function failedTest() { return $this->failedTest; } /** - * Gets the thrown exception. - * - * @return Exception - * @access public - */ + * Gets the thrown exception. + * + * @return Exception + * @access public + */ public function thrownException() { return $this->thrownException; } /** - * Returns the exception's message. - * - * @return string - * @access public - */ + * Returns the exception's message. + * + * @return string + * @access public + */ public function exceptionMessage() { return $this->thrownException()->getMessage(); } /** - * Returns TRUE if the thrown exception - * is of type AssertionFailedError. - * - * @return boolean - * @access public - */ + * Returns TRUE if the thrown exception + * is of type AssertionFailedError. + * + * @return boolean + * @access public + */ public function isFailure() { return ($this->thrownException() instanceof PHPUnit2_Framework_AssertionFailedError); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestListener.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Framework/TestListener.php diff -u pear/PHPUnit2/Framework/TestListener.php:1.10 pear/PHPUnit2/Framework/TestListener.php:1.11 --- pear/PHPUnit2/Framework/TestListener.php:1.10 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/TestListener.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestListener.php,v 1.10 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: TestListener.php,v 1.11 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,64 +36,64 @@ */ interface PHPUnit2_Framework_TestListener { /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e); /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e); /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e); /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite); /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite); /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test); /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestResult.php?r1=1.30&r2=1.31&ty=u Index: pear/PHPUnit2/Framework/TestResult.php diff -u pear/PHPUnit2/Framework/TestResult.php:1.30 pear/PHPUnit2/Framework/TestResult.php:1.31 --- pear/PHPUnit2/Framework/TestResult.php:1.30 Thu May 26 05:41:34 2005 +++ pear/PHPUnit2/Framework/TestResult.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestResult.php,v 1.30 2005/05/26 09:41:34 sebastian Exp $ + * @version CVS: $Id: TestResult.php,v 1.31 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -37,71 +37,71 @@ */ class PHPUnit2_Framework_TestResult { /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $errors = array(); /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $failures = array(); /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $notImplemented = array(); /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $listeners = array(); /** - * @var integer - * @access protected - */ + * @var integer + * @access protected + */ protected $runTests = 0; /** - * Code Coverage information provided by Xdebug. - * - * @var array - * @access protected - */ + * Code Coverage information provided by Xdebug. + * + * @var array + * @access protected + */ protected $codeCoverageInformation = array(); /** - * @var boolean - * @access protected - */ + * @var boolean + * @access protected + */ protected $collectCodeCoverageInformation = FALSE; /** - * @var boolean - * @access private - */ + * @var boolean + * @access private + */ private $stop = FALSE; /** - * Registers a TestListener. - * - * @param PHPUnit2_Framework_TestListener - * @access public - */ + * Registers a TestListener. + * + * @param PHPUnit2_Framework_TestListener + * @access public + */ public function addListener(PHPUnit2_Framework_TestListener $listener) { $this->listeners[] = $listener; } /** - * Unregisters a TestListener. - * - * @param PHPUnit2_Framework_TestListener $listener - * @access public - */ + * Unregisters a TestListener. + * + * @param PHPUnit2_Framework_TestListener $listener + * @access public + */ public function removeListener(PHPUnit2_Framework_TestListener $listener) { for ($i = 0; $i < sizeof($this->listeners); $i++) { if ($this->listeners[$i] === $listener) { @@ -111,13 +111,13 @@ } /** - * Adds an error to the list of errors. - * The passed in exception caused the error. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Adds an error to the list of errors. + * The passed in exception caused the error. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { if ($e instanceof PHPUnit2_Framework_IncompleteTest) { $this->notImplemented[] = new PHPUnit2_Framework_TestFailure($test, $e); @@ -135,13 +135,13 @@ } /** - * Adds a failure to the list of failures. - * The passed in exception caused the failure. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * Adds a failure to the list of failures. + * The passed in exception caused the failure. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { if ($e instanceof PHPUnit2_Framework_IncompleteTest) { $this->notImplemented[] = new PHPUnit2_Framework_TestFailure($test, $e); @@ -159,12 +159,12 @@ } /** - * Informs the result that a testsuite will be started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * Informs the result that a testsuite will be started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { foreach ($this->listeners as $listener) { $listener->startTestSuite($suite); @@ -172,12 +172,12 @@ } /** - * Informs the result that a testsuite was completed. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * Informs the result that a testsuite was completed. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { foreach ($this->listeners as $listener) { $listener->endTestSuite($suite); @@ -185,11 +185,11 @@ } /** - * Informs the result that a test will be started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Informs the result that a test will be started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $this->runTests += $test->countTestCases(); @@ -199,11 +199,11 @@ } /** - * Informs the result that a test was completed. - * - * @param PHPUnit2_Framework_Test - * @access public - */ + * Informs the result that a test was completed. + * + * @param PHPUnit2_Framework_Test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { foreach ($this->listeners as $listener) { $listener->endTest($test); @@ -211,83 +211,83 @@ } /** - * Returns TRUE if no incomplete test occured. - * - * @return boolean - * @access public - */ + * Returns TRUE if no incomplete test occured. + * + * @return boolean + * @access public + */ public function allCompletlyImplemented() { return $this->notImplementedCount() == 0; } /** - * Gets the number of incomplete tests. - * - * @return integer - * @access public - */ + * Gets the number of incomplete tests. + * + * @return integer + * @access public + */ public function notImplementedCount() { return sizeof($this->notImplemented); } /** - * Returns an Enumeration for the incomplete tests. - * - * @return array - * @access public - */ + * Returns an Enumeration for the incomplete tests. + * + * @return array + * @access public + */ public function notImplemented() { return $this->notImplemented; } /** - * Gets the number of detected errors. - * - * @return integer - * @access public - */ + * Gets the number of detected errors. + * + * @return integer + * @access public + */ public function errorCount() { return sizeof($this->errors); } /** - * Returns an Enumeration for the errors. - * - * @return array - * @access public - */ + * Returns an Enumeration for the errors. + * + * @return array + * @access public + */ public function errors() { return $this->errors; } /** - * Gets the number of detected failures. - * - * @return integer - * @access public - */ + * Gets the number of detected failures. + * + * @return integer + * @access public + */ public function failureCount() { return sizeof($this->failures); } /** - * Returns an Enumeration for the failures. - * - * @return array - * @access public - */ + * Returns an Enumeration for the failures. + * + * @return array + * @access public + */ public function failures() { return $this->failures; } /** - * Enables or disables the collection of Code Coverage information. - * - * @param boolean $flag - * @throws InvalidArgumentException - * @access public - * @since Method available since Release 2.3.0 - */ + * Enables or disables the collection of Code Coverage information. + * + * @param boolean $flag + * @throws InvalidArgumentException + * @access public + * @since Method available since Release 2.3.0 + */ public function collectCodeCoverageInformation($flag) { if (is_bool($flag)) { $this->collectCodeCoverageInformation = $flag; @@ -297,33 +297,33 @@ } /** - * Returns Code Coverage data per test case. - * - * Format of the result array: - * - * <code> - * array( - * "testCase" => array( - * "/tested/code.php" => array( - * linenumber => numberOfExecutions - * ) - * ) - * ) - * </code> - * - * @return array - * @access public - */ + * Returns Code Coverage data per test case. + * + * Format of the result array: + * + * <code> + * array( + * "testCase" => array( + * "/tested/code.php" => array( + * linenumber => numberOfExecutions + * ) + * ) + * ) + * </code> + * + * @return array + * @access public + */ public function getCodeCoverageInformation() { return $this->codeCoverageInformation; } /** - * Runs a TestCase. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Runs a TestCase. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function run(PHPUnit2_Framework_Test $test) { $this->startTest($test); @@ -365,40 +365,40 @@ } /** - * Gets the number of run tests. - * - * @return integer - * @access public - */ + * Gets the number of run tests. + * + * @return integer + * @access public + */ public function runCount() { return $this->runTests; } /** - * Checks whether the test run should stop. - * - * @return boolean - * @access public - */ + * Checks whether the test run should stop. + * + * @return boolean + * @access public + */ public function shouldStop() { return $this->stop; } /** - * Marks that the test run should stop. - * - * @access public - */ + * Marks that the test run should stop. + * + * @access public + */ public function stop() { $this->stop = TRUE; } /** - * Returns whether the entire test was successful or not. - * - * @return boolean - * @access public - */ + * Returns whether the entire test was successful or not. + * + * @return boolean + * @access public + */ public function wasSuccessful() { return empty($this->errors) && empty($this->failures); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestSuite.php?r1=1.24&r2=1.25&ty=u Index: pear/PHPUnit2/Framework/TestSuite.php diff -u pear/PHPUnit2/Framework/TestSuite.php:1.24 pear/PHPUnit2/Framework/TestSuite.php:1.25 --- pear/PHPUnit2/Framework/TestSuite.php:1.24 Thu May 5 11:28:26 2005 +++ pear/PHPUnit2/Framework/TestSuite.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestSuite.php,v 1.24 2005/05/05 15:28:26 sebastian Exp $ + * @version CVS: $Id: TestSuite.php,v 1.25 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -61,43 +61,43 @@ */ class PHPUnit2_Framework_TestSuite implements PHPUnit2_Framework_Test { /** - * The name of the test suite. - * - * @var string - * @access private - */ + * The name of the test suite. + * + * @var string + * @access private + */ private $name = ''; /** - * The tests in the test suite. - * - * @var array - * @access private - */ + * The tests in the test suite. + * + * @var array + * @access private + */ private $tests = array(); /** - * Constructs a new TestSuite: - * - * - PHPUnit2_Framework_TestSuite() constructs an empty TestSuite. - * - * - PHPUnit2_Framework_TestSuite(ReflectionClass) constructs a - * TestSuite from the given class. - * - * - PHPUnit2_Framework_TestSuite(ReflectionClass, String) - * constructs a TestSuite from the given class with the given - * name. - * - * - PHPUnit2_Framework_TestSuite(String) either constructs a - * TestSuite from the given class (if the passed string is the - * name of an existing class) or constructs an empty TestSuite - * with the given name. - * - * @param mixed $theClass - * @param string $name - * @throws InvalidArgumentException - * @access public - */ + * Constructs a new TestSuite: + * + * - PHPUnit2_Framework_TestSuite() constructs an empty TestSuite. + * + * - PHPUnit2_Framework_TestSuite(ReflectionClass) constructs a + * TestSuite from the given class. + * + * - PHPUnit2_Framework_TestSuite(ReflectionClass, String) + * constructs a TestSuite from the given class with the given + * name. + * + * - PHPUnit2_Framework_TestSuite(String) either constructs a + * TestSuite from the given class (if the passed string is the + * name of an existing class) or constructs an empty TestSuite + * with the given name. + * + * @param mixed $theClass + * @param string $name + * @throws InvalidArgumentException + * @access public + */ public function __construct($theClass = '', $name = '') { $argumentsValid = FALSE; @@ -169,31 +169,31 @@ } /** - * Returns a string representation of the test suite. - * - * @return string - * @access public - */ + * Returns a string representation of the test suite. + * + * @return string + * @access public + */ public function toString() { return $this->getName(); } /** - * Adds a test to the suite. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * Adds a test to the suite. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function addTest(PHPUnit2_Framework_Test $test) { $this->tests[] = $test; } /** - * Adds the tests from the given class to the suite. - * - * @param mixed $testClass - * @access public - */ + * Adds the tests from the given class to the suite. + * + * @param mixed $testClass + * @access public + */ public function addTestSuite($testClass) { if (is_string($testClass) && class_exists($testClass)) { @@ -207,11 +207,11 @@ } /** - * Counts the number of test cases that will be run by this test. - * - * @return integer - * @access public - */ + * Counts the number of test cases that will be run by this test. + * + * @return integer + * @access public + */ public function countTestCases() { $count = 0; @@ -223,12 +223,12 @@ } /** - * @param ReflectionClass $theClass - * @param string $name - * @return PHPUnit2_Framework_Test - * @access public - * @static - */ + * @param ReflectionClass $theClass + * @param string $name + * @return PHPUnit2_Framework_Test + * @access public + * @static + */ public static function createTest(ReflectionClass $theClass, $name) { if (!$theClass->isInstantiable()) { return self::warning( @@ -271,33 +271,33 @@ } /** - * Creates a default TestResult object. - * - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * Creates a default TestResult object. + * + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createResult() { return new PHPUnit2_Framework_TestResult; } /** - * Returns the name of the suite. - * - * @return string - * @access public - */ + * Returns the name of the suite. + * + * @return string + * @access public + */ public function getName() { return $this->name; } /** - * Runs the tests and collects their result in a TestResult. - * - * @param PHPUnit2_Framework_TestResult $result - * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException - * @access public - */ + * Runs the tests and collects their result in a TestResult. + * + * @param PHPUnit2_Framework_TestResult $result + * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException + * @access public + */ public function run($result = NULL) { if ($result === NULL) { $result = $this->createResult(); @@ -326,33 +326,33 @@ } /** - * Runs a test. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_TestResult $testResult - * @access public - */ + * Runs a test. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_TestResult $testResult + * @access public + */ public function runTest(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_TestResult $result) { $test->run($result); } /** - * Sets the name of the suite. - * - * @param string - * @access public - */ + * Sets the name of the suite. + * + * @param string + * @access public + */ public function setName($name) { $this->name = $name; } /** - * Returns the test at the given index. - * - * @param integer - * @return PHPUnit2_Framework_Test - * @access public - */ + * Returns the test at the given index. + * + * @param integer + * @return PHPUnit2_Framework_Test + * @access public + */ public function testAt($index) { if (isset($this->tests[$index])) { return $this->tests[$index]; @@ -362,31 +362,31 @@ } /** - * Returns the number of tests in this suite. - * - * @return integer - * @access public - */ + * Returns the number of tests in this suite. + * + * @return integer + * @access public + */ public function testCount() { return sizeof($this->tests); } /** - * Returns the tests as an enumeration. - * - * @return array - * @access public - */ + * Returns the tests as an enumeration. + * + * @return array + * @access public + */ public function tests() { return $this->tests; } /** - * @param ReflectionMethod $method - * @param array $names - * @param ReflectionClass $theClass - * @access private - */ + * @param ReflectionMethod $method + * @param array $names + * @param ReflectionClass $theClass + * @access private + */ private function addTestMethod(ReflectionMethod $method, &$names, ReflectionClass $theClass) { $name = $method->getName(); @@ -419,29 +419,29 @@ } /** - * @param ReflectionMethod $method - * @return boolean - * @access private - */ + * @param ReflectionMethod $method + * @return boolean + * @access private + */ private function isPublicTestMethod(ReflectionMethod $method) { return ($this->isTestMethod($method) && $method->isPublic()); } /** - * @param ReflectionMethod $method - * @return boolean - * @access private - */ + * @param ReflectionMethod $method + * @return boolean + * @access private + */ private function isTestMethod(ReflectionMethod $method) { return (substr($method->name, 0, 4) == 'test'); } /** - * @param string $message - * @return PHPUnit2_Framework_Warning - * @access private - */ + * @param string $message + * @return PHPUnit2_Framework_Warning + * @access private + */ private static function warning($message) { return new PHPUnit2_Framework_Warning($message); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Warning.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Framework/Warning.php diff -u pear/PHPUnit2/Framework/Warning.php:1.10 pear/PHPUnit2/Framework/Warning.php:1.11 --- pear/PHPUnit2/Framework/Warning.php:1.10 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Framework/Warning.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Warning.php,v 1.10 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: Warning.php,v 1.11 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,23 +36,23 @@ */ class PHPUnit2_Framework_Warning extends PHPUnit2_Framework_TestCase { /** - * @var string - * @access private - */ + * @var string + * @access private + */ private $message = ''; /** - * @param string $message - * @access public - */ + * @param string $message + * @access public + */ public function __construct($message = '') { $this->message = $message; parent::__construct('Warning'); } /** - * @access protected - */ + * @access protected + */ protected function runTest() { $this->fail($this->message); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/BaseTestRunner.php?r1=1.16&r2=1.17&ty=u Index: pear/PHPUnit2/Runner/BaseTestRunner.php diff -u pear/PHPUnit2/Runner/BaseTestRunner.php:1.16 pear/PHPUnit2/Runner/BaseTestRunner.php:1.17 --- pear/PHPUnit2/Runner/BaseTestRunner.php:1.16 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Runner/BaseTestRunner.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: BaseTestRunner.php,v 1.16 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: BaseTestRunner.php,v 1.17 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -39,98 +39,98 @@ const SUITE_METHODNAME = 'suite'; /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed(PHPUnit2_Runner_TestRunListener::STATUS_ERROR, $test, $e); } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->testFailed(PHPUnit2_Runner_TestRunListener::STATUS_FAILURE, $test, $e); } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed(PHPUnit2_Runner_TestRunListener::STATUS_INCOMPLETE, $test, $e); } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $this->testStarted($test->getName()); } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $this->testEnded($test->getName()); } /** - * Returns the loader to be used. - * - * @return PHPUnit2_Runner_TestSuiteLoader - * @access public - */ + * Returns the loader to be used. + * + * @return PHPUnit2_Runner_TestSuiteLoader + * @access public + */ public function getLoader() { return new PHPUnit2_Runner_StandardTestSuiteLoader; } /** - * Returns the Test corresponding to the given suite. - * This is a template method, subclasses override - * the runFailed() and clearStatus() methods. - * - * @param string $suiteClassName - * @param string $suiteClassFile - * @return PHPUnit2_Framework_Test - * @access public - */ + * Returns the Test corresponding to the given suite. + * This is a template method, subclasses override + * the runFailed() and clearStatus() methods. + * + * @param string $suiteClassName + * @param string $suiteClassFile + * @return PHPUnit2_Framework_Test + * @access public + */ public function getTest($suiteClassName, $suiteClassFile = '') { if ($suiteClassFile == $suiteClassName . '.php') { $suiteClassFile = ''; @@ -183,62 +183,62 @@ } /** - * Override to define how to handle a failed loading of - * a test suite. - * - * @param string $message - * @access protected - * @abstract - */ + * Override to define how to handle a failed loading of + * a test suite. + * + * @param string $message + * @access protected + * @abstract + */ protected abstract function runFailed($message); /** - * Returns the loaded ReflectionClass for a suite name. - * - * @param string $suiteClassName - * @param string $suiteClassFile - * @return ReflectionClass - * @access protected - */ + * Returns the loaded ReflectionClass for a suite name. + * + * @param string $suiteClassName + * @param string $suiteClassFile + * @return ReflectionClass + * @access protected + */ protected function loadSuiteClass($suiteClassName, $suiteClassFile = '') { return $this->getLoader()->load($suiteClassName, $suiteClassFile); } /** - * Clears the status message. - * - * @access protected - */ + * Clears the status message. + * + * @access protected + */ protected function clearStatus() { } /** - * A test started. - * - * @param string $testName - * @access public - * @abstract - */ + * A test started. + * + * @param string $testName + * @access public + * @abstract + */ public abstract function testStarted($testName); /** - * A test ended. - * - * @param string $testName - * @access public - * @abstract - */ + * A test ended. + * + * @param string $testName + * @access public + * @abstract + */ public abstract function testEnded($testName); /** - * A test failed. - * - * @param integer $status - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - * @abstract - */ + * A test failed. + * + * @param integer $status + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + * @abstract + */ public abstract function testFailed($status, PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/IncludePathTestCollector.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit2/Runner/IncludePathTestCollector.php diff -u pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.12 pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13 --- pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.12 Tue Apr 26 06:56:32 2005 +++ pear/PHPUnit2/Runner/IncludePathTestCollector.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: IncludePathTestCollector.php,v 1.12 2005/04/26 10:56:32 sebastian Exp $ + * @version CVS: $Id: IncludePathTestCollector.php,v 1.13 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -39,9 +39,9 @@ class PHPUnit2_Runner_IncludePathTestCollector implements PHPUnit2_Runner_TestCollector { /** - * @return array - * @access public - */ + * @return array + * @access public + */ public function collectTests() { $iterator = new AppendIterator; $result = array(); @@ -76,13 +76,13 @@ } /** - * Considers a file to contain a test class when it contains the - * pattern "Test" in its name and its name ends with ".php". - * - * @param string $classFileName - * @return boolean - * @access protected - */ + * Considers a file to contain a test class when it contains the + * pattern "Test" in its name and its name ends with ".php". + * + * @param string $classFileName + * @return boolean + * @access protected + */ protected function isTestClass($classFileName) { return (strpos($classFileName, 'Test') !== FALSE && substr($classFileName, -4) == '.php') ? TRUE : FALSE; } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/StandardTestSuiteLoader.php?r1=1.18&r2=1.19&ty=u Index: pear/PHPUnit2/Runner/StandardTestSuiteLoader.php diff -u pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.18 pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19 --- pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.18 Sat Apr 30 10:52:46 2005 +++ pear/PHPUnit2/Runner/StandardTestSuiteLoader.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: StandardTestSuiteLoader.php,v 1.18 2005/04/30 14:52:46 sebastian Exp $ + * @version CVS: $Id: StandardTestSuiteLoader.php,v 1.19 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,12 +36,12 @@ */ class PHPUnit2_Runner_StandardTestSuiteLoader implements PHPUnit2_Runner_TestSuiteLoader { /** - * @param string $suiteClassName - * @param string $suiteClassFile - * @return ReflectionClass - * @throws RuntimeException - * @access public - */ + * @param string $suiteClassName + * @param string $suiteClassFile + * @return ReflectionClass + * @throws RuntimeException + * @access public + */ public function load($suiteClassName, $suiteClassFile = '') { $suiteClassName = str_replace('.php', '', $suiteClassName); $suiteClassFile = !empty($suiteClassFile) ? $suiteClassFile : str_replace('_', '/', $suiteClassName) . '.php'; @@ -82,10 +82,10 @@ } /** - * @param ReflectionClass $aClass - * @return ReflectionClass - * @access public - */ + * @param ReflectionClass $aClass + * @return ReflectionClass + * @access public + */ public function reload(ReflectionClass $aClass) { return $aClass; } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/TestCollector.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit2/Runner/TestCollector.php diff -u pear/PHPUnit2/Runner/TestCollector.php:1.6 pear/PHPUnit2/Runner/TestCollector.php:1.7 --- pear/PHPUnit2/Runner/TestCollector.php:1.6 Mon Apr 18 10:11:55 2005 +++ pear/PHPUnit2/Runner/TestCollector.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestCollector.php,v 1.6 2005/04/18 14:11:55 sebastian Exp $ + * @version CVS: $Id: TestCollector.php,v 1.7 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -35,9 +35,9 @@ */ interface PHPUnit2_Runner_TestCollector { /** - * @return array - * @access public - */ + * @return array + * @access public + */ public function collectTests(); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/TestRunListener.php?r1=1.7&r2=1.8&ty=u Index: pear/PHPUnit2/Runner/TestRunListener.php diff -u pear/PHPUnit2/Runner/TestRunListener.php:1.7 pear/PHPUnit2/Runner/TestRunListener.php:1.8 --- pear/PHPUnit2/Runner/TestRunListener.php:1.7 Mon Apr 18 10:11:55 2005 +++ pear/PHPUnit2/Runner/TestRunListener.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestRunListener.php,v 1.7 2005/04/18 14:11:55 sebastian Exp $ + * @version CVS: $Id: TestRunListener.php,v 1.8 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -23,7 +23,7 @@ /** * A listener interface for observing the * execution of a test run. Unlike TestListener, - * this interface using only primitive objects, + * this interface uses only primitive objects, * making it suitable for remote test execution. * * @category Testing @@ -41,41 +41,41 @@ const STATUS_INCOMPLETE = 3; /** - * @param string $testSuiteName - * @param integer $testCount - * @access public - */ + * @param string $testSuiteName + * @param integer $testCount + * @access public + */ public function testRunStarted($testSuiteName, $testCount); /** - * @param integer $elapsedTime - */ + * @param integer $elapsedTime + */ public function testRunEnded($elapsedTime); /** - * @param integer $elapsedTime - * @access public - */ + * @param integer $elapsedTime + * @access public + */ public function testRunStopped($elapsedTime); /** - * @param string $testName - * @access public - */ + * @param string $testName + * @access public + */ public function testStarted($testName); /** - * @param string $testName - * @access public - */ + * @param string $testName + * @access public + */ public function testEnded($testName); /** - * @param integer $status - * @param string $testName - * @param string $trace - * @access public - */ + * @param integer $status + * @param string $testName + * @param string $trace + * @access public + */ public function testFailed($status, $testName, $trace); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/TestSuiteLoader.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Runner/TestSuiteLoader.php diff -u pear/PHPUnit2/Runner/TestSuiteLoader.php:1.10 pear/PHPUnit2/Runner/TestSuiteLoader.php:1.11 --- pear/PHPUnit2/Runner/TestSuiteLoader.php:1.10 Sat Apr 30 10:52:46 2005 +++ pear/PHPUnit2/Runner/TestSuiteLoader.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestSuiteLoader.php,v 1.10 2005/04/30 14:52:46 sebastian Exp $ + * @version CVS: $Id: TestSuiteLoader.php,v 1.11 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,18 +34,18 @@ */ interface PHPUnit2_Runner_TestSuiteLoader { /** - * @param string $suiteClassName - * @param string $suiteClassFile - * @return ReflectionClass - * @access public - */ + * @param string $suiteClassName + * @param string $suiteClassFile + * @return ReflectionClass + * @access public + */ public function load($suiteClassName, $suiteClassFile = ''); /** - * @param ReflectionClass $aClass - * @return ReflectionClass - * @access public - */ + * @param ReflectionClass $aClass + * @return ReflectionClass + * @access public + */ public function reload(ReflectionClass $aClass); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/Version.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit2/Runner/Version.php diff -u pear/PHPUnit2/Runner/Version.php:1.6 pear/PHPUnit2/Runner/Version.php:1.7 --- pear/PHPUnit2/Runner/Version.php:1.6 Mon Apr 11 02:41:36 2005 +++ pear/PHPUnit2/Runner/Version.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Version.php,v 1.6 2005/04/11 06:41:36 sebastian Exp $ + * @version CVS: $Id: Version.php,v 1.7 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,21 +34,21 @@ */ class PHPUnit2_Runner_Version { /** - * Returns the current version of PHPUnit. - * - * @return string - * @access public - * @static - */ + * Returns the current version of PHPUnit. + * + * @return string + * @access public + * @static + */ public static function id() { return '@package_version@'; } /** - * @return string - * @access public - * @static - */ + * @return string + * @access public + * @static + */ public static function getVersionString() { return 'PHPUnit @package_version@ by Sebastian Bergmann.'; } http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/ResultPrinter.php?r1=1.18&r2=1.19&ty=u Index: pear/PHPUnit2/TextUI/ResultPrinter.php diff -u pear/PHPUnit2/TextUI/ResultPrinter.php:1.18 pear/PHPUnit2/TextUI/ResultPrinter.php:1.19 --- pear/PHPUnit2/TextUI/ResultPrinter.php:1.18 Tue Apr 26 06:56:33 2005 +++ pear/PHPUnit2/TextUI/ResultPrinter.php Thu May 26 12:05:36 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ResultPrinter.php,v 1.18 2005/04/26 10:56:33 sebastian Exp $ + * @version CVS: $Id: ResultPrinter.php,v 1.19 2005/05/26 16:05:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -36,22 +36,22 @@ */ class PHPUnit2_TextUI_ResultPrinter extends PHPUnit2_Util_Printer implements PHPUnit2_Framework_TestListener { /** - * @var integer - * @access private - */ + * @var integer + * @access private + */ private $column = 0; /** - * @var boolean - * @access private - */ + * @var boolean + * @access private + */ private $lastTestFailed = FALSE; /** - * @param PHPUnit2_Framework_TestResult $result - * @param float $runTime - * @access public - */ + * @param PHPUnit2_Framework_TestResult $result + * @param float $runTime + * @access public + */ public function printResult(PHPUnit2_Framework_TestResult $result, $timeElapsed) { $this->printHeader($timeElapsed); $this->printErrors($result); @@ -61,11 +61,11 @@ } /** - * @param array $defects - * @param integer $count - * @param string $type - * @access protected - */ + * @param array $defects + * @param integer $count + * @param string $type + * @access protected + */ protected function printDefects($defects, $count, $type) { if ($count == 0) { return; @@ -90,20 +90,20 @@ } /** - * @param PHPUnit2_Framework_TestFailure $defect - * @param integer $count - * @access protected - */ + * @param PHPUnit2_Framework_TestFailure $defect + * @param integer $count + * @access protected + */ protected function printDefect(PHPUnit2_Framework_TestFailure $defect, $count) { $this->printDefectHeader($defect, $count); $this->printDefectTrace($defect); } /** - * @param PHPUnit2_Framework_TestFailure $defect - * @param integer $count - * @access protected - */ + * @param PHPUnit2_Framework_TestFailure $defect + * @param integer $count + * @access protected + */ protected function printDefectHeader(PHPUnit2_Framework_TestFailure $defect, $count) { $this->write( sprintf( @@ -116,9 +116,9 @@ } /** - * @param PHPUnit2_Framework_TestFailure $defect - * @access protected - */ + * @param PHPUnit2_Framework_TestFailure $defect + * @access protected + */ protected function printDefectTrace(PHPUnit2_Framework_TestFailure $defect) { $e = $defect->thrownException(); $message = method_exists($e, 'toString') ? $e->toString() : $e->getMessage(); @@ -133,33 +133,33 @@ } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printErrors(PHPUnit2_Framework_TestResult $result) { $this->printDefects($result->errors(), $result->errorCount(), 'error'); } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printFailures(PHPUnit2_Framework_TestResult $result) { $this->printDefects($result->failures(), $result->failureCount(), 'failure'); } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printIncompletes(PHPUnit2_Framework_TestResult $result) { $this->printDefects($result->notImplemented(), $result->notImplementedCount(), 'incomplete testcase'); } /** - * @param float $timeElapsed - * @access protected - */ + * @param float $timeElapsed + * @access protected + */ protected function printHeader($timeElapsed) { $this->write( sprintf( @@ -171,9 +171,9 @@ } /** - * @param PHPUnit2_Framework_TestResult $result - * @access protected - */ + * @param PHPUnit2_Framework_TestResult $result + * @access protected + */ protected function printFooter(PHPUnit2_Framework_TestResult $result) { if ($result->allCompletlyImplemented() && $result->wasSuccessful()) { @@ -214,19 +214,19 @@ } /** - * @access public - */ + * @access public + */ public function printWaitPrompt() { $this->write("\n<RETURN> to continue\n"); } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->write('E'); $this->nextColumn(); @@ -235,12 +235,12 @@ } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->write('F'); $this->nextColumn(); @@ -249,12 +249,12 @@ } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->write('I'); $this->nextColumn(); @@ -263,40 +263,40 @@ } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { if (!$this->lastTestFailed) { $this->write('.'); @@ -307,8 +307,8 @@ } /** - * @access private - */ + * @access private + */ private function nextColumn() { if ($this->column++ >= 40) { $this->column = 0; http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/TestRunner.php?r1=1.60&r2=1.61&ty=u Index: pear/PHPUnit2/TextUI/TestRunner.php diff -u pear/PHPUnit2/TextUI/TestRunner.php:1.60 pear/PHPUnit2/TextUI/TestRunner.php:1.61 --- pear/PHPUnit2/TextUI/TestRunner.php:1.60 Tue May 24 05:43:36 2005 +++ pear/PHPUnit2/TextUI/TestRunner.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: TestRunner.php,v 1.60 2005/05/24 09:43:36 sebastian Exp $ + * @version CVS: $Id: TestRunner.php,v 1.61 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -48,28 +48,28 @@ const EXCEPTION_EXIT = 2; /** - * @var PHPUnit2_Runner_TestSuiteLoader - * @access private - */ + * @var PHPUnit2_Runner_TestSuiteLoader + * @access private + */ private $loader = NULL; /** - * @var PHPUnit2_TextUI_ResultPrinter - * @access private - */ + * @var PHPUnit2_TextUI_ResultPrinter + * @access private + */ private $printer = NULL; /** - * @var boolean - * @access private - * @static - */ + * @var boolean + * @access private + * @static + */ private static $versionStringPrinted = FALSE; /** - * @access public - * @static - */ + * @access public + * @static + */ public static function main() { $aTestRunner = new PHPUnit2_TextUI_TestRunner; @@ -91,10 +91,10 @@ } /** - * @param array $arguments - * @throws RuntimeException - * @access protected - */ + * @param array $arguments + * @throws RuntimeException + * @access protected + */ protected function start($arguments) { $coverageDataFile = FALSE; $coverageHTMLFile = FALSE; @@ -268,15 +268,15 @@ } /** - * @param mixed $test - * @param mixed $coverageDataFile - * @param mixed $testdoxHTMLFile - * @param mixed $testdoxTextFile - * @param mixed $xmlLogfile - * @param boolean $wait - * @access public - * @static - */ + * @param mixed $test + * @param mixed $coverageDataFile + * @param mixed $testdoxHTMLFile + * @param mixed $testdoxTextFile + * @param mixed $xmlLogfile + * @param boolean $wait + * @access public + * @static + */ public static function run($test, $coverageDataFile = FALSE, $coverageHTMLFile = FALSE, $coverageTextFile = FALSE, $testdoxHTMLFile = FALSE, $testdoxTextFile = FALSE, $xmlLogfile = FALSE, $wait = FALSE) { if ($test instanceof ReflectionClass) { $test = new PHPUnit2_Framework_TestSuite($test); @@ -299,12 +299,12 @@ } /** - * Runs a single test and waits until the user types RETURN. - * - * @param PHPUnit2_Framework_Test $suite - * @access public - * @static - */ + * Runs a single test and waits until the user types RETURN. + * + * @param PHPUnit2_Framework_Test $suite + * @access public + * @static + */ public static function runAndWait(PHPUnit2_Framework_Test $suite) { $aTestRunner = new PHPUnit2_TextUI_TestRunner; @@ -321,25 +321,25 @@ } /** - * @return PHPUnit2_Framework_TestResult - * @access protected - */ + * @return PHPUnit2_Framework_TestResult + * @access protected + */ protected function createTestResult() { return new PHPUnit2_Framework_TestResult; } /** - * @param PHPUnit2_Framework_Test $suite - * @param mixed $coverageDataFile - * @param mixed $coverageHTMLFile - * @param mixed $coverageTextFile - * @param mixed $testdoxHTMLFile - * @param mixed $testdoxTextFile - * @param mixed $xmlLogfile - * @param boolean $wait - * @return PHPUnit2_Framework_TestResult - * @access public - */ + * @param PHPUnit2_Framework_Test $suite + * @param mixed $coverageDataFile + * @param mixed $coverageHTMLFile + * @param mixed $coverageTextFile + * @param mixed $testdoxHTMLFile + * @param mixed $testdoxTextFile + * @param mixed $xmlLogfile + * @param boolean $wait + * @return PHPUnit2_Framework_TestResult + * @access public + */ public function doRun(PHPUnit2_Framework_Test $suite, $coverageDataFile = FALSE, $coverageHTMLFile = FALSE, $coverageTextFile = FALSE, $testdoxHTMLFile = FALSE, $testdoxTextFile = FALSE, $xmlLogfile = FALSE, $wait = FALSE) { $result = $this->createTestResult(); $timer = new Benchmark_Timer; @@ -404,12 +404,12 @@ } /** - * Returns the loader to be used. - * - * @return PHPUnit2_Runner_TestSuiteLoader - * @access public - * @since Method available since Release 2.2.0 - */ + * Returns the loader to be used. + * + * @return PHPUnit2_Runner_TestSuiteLoader + * @access public + * @since Method available since Release 2.2.0 + */ public function getLoader() { if ($this->loader === NULL) { $this->loader = new PHPUnit2_Runner_StandardTestSuiteLoader; @@ -419,13 +419,13 @@ } /** - * @param PHPUnit2_Framework_TestResult $result - * @param mixed $coverageDataFile - * @param mixed $coverageHTMLFile - * @param mixed $coverageTextFile - * @access protected - * @since Method available since Release 2.1.0 - */ + * @param PHPUnit2_Framework_TestResult $result + * @param mixed $coverageDataFile + * @param mixed $coverageHTMLFile + * @param mixed $coverageTextFile + * @access protected + * @since Method available since Release 2.1.0 + */ protected function handleCodeCoverageInformation(PHPUnit2_Framework_TestResult $result, $coverageDataFile, $coverageHTMLFile, $coverageTextFile) { if ($coverageDataFile !== FALSE && $fp = fopen($coverageDataFile, 'w')) { @@ -453,8 +453,8 @@ } /** - * @access public - */ + * @access public + */ public function showError($message) { self::printVersionString(); print $message . "\n"; @@ -463,8 +463,8 @@ } /** - * @access public - */ + * @access public + */ public function showHelp() { self::printVersionString(); print "Usage: phpunit [switches] UnitTest [UnitTest.php]\n"; @@ -487,9 +487,9 @@ } /** - * @param boolean $wait - * @access protected - */ + * @param boolean $wait + * @access protected + */ protected function pause($wait) { if (!$wait) { return; @@ -501,49 +501,49 @@ } /** - * @param PHPUnit2_TextUI_ResultPrinter $resultPrinter - * @access public - */ + * @param PHPUnit2_TextUI_ResultPrinter $resultPrinter + * @access public + */ public function setPrinter(PHPUnit2_TextUI_ResultPrinter $resultPrinter) { $this->printer = $resultPrinter; } /** - * A test started. - * - * @param string $testName - * @access public - */ + * A test started. + * + * @param string $testName + * @access public + */ public function testStarted($testName) { } /** - * A test ended. - * - * @param string $testName - * @access public - */ + * A test ended. + * + * @param string $testName + * @access public + */ public function testEnded($testName) { } /** - * A test failed. - * - * @param integer $status - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A test failed. + * + * @param integer $status + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function testFailed($status, PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { } /** - * Override to define how to handle a failed loading of - * a test suite. - * - * @param string $message - * @access protected - */ + * Override to define how to handle a failed loading of + * a test suite. + * + * @param string $message + * @access protected + */ protected function runFailed($message) { self::printVersionString(); print $message; @@ -551,9 +551,9 @@ } /** - * @access private - * @since Method available since Release 2.2.0 - */ + * @access private + * @since Method available since Release 2.2.0 + */ private static function printVersionString() { if (!self::$versionStringPrinted) { print PHPUnit2_Runner_Version::getVersionString() . "\n\n"; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Filter.php?r1=1.30&r2=1.31&ty=u Index: pear/PHPUnit2/Util/Filter.php diff -u pear/PHPUnit2/Util/Filter.php:1.30 pear/PHPUnit2/Util/Filter.php:1.31 --- pear/PHPUnit2/Util/Filter.php:1.30 Thu May 26 04:45:47 2005 +++ pear/PHPUnit2/Util/Filter.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Filter.php,v 1.30 2005/05/26 08:45:47 sebastian Exp $ + * @version CVS: $Id: Filter.php,v 1.31 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -34,12 +34,12 @@ */ class PHPUnit2_Util_Filter { /** - * Source files that are to be filtered. - * - * @var array - * @access protected - * @static - */ + * Source files that are to be filtered. + * + * @var array + * @access protected + * @static + */ protected static $filteredFiles = array( 'PHPUnit2/Extensions/ExceptionTestCase.php', 'PHPUnit2/Extensions/PerformanceTestCase.php', @@ -102,13 +102,13 @@ ); /** - * Adds a new file to be filtered. - * - * @param string - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Adds a new file to be filtered. + * + * @param string + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function addFileToFilter($filename) { $filename = self::getCanonicalFilename($filename); @@ -118,13 +118,13 @@ } /** - * Removes a file from the filter. - * - * @param string - * @access public - * @static - * @since Method available since Release 2.1.0 - */ + * Removes a file from the filter. + * + * @param string + * @access public + * @static + * @since Method available since Release 2.1.0 + */ public static function removeFileFromFilter($filename) { $filename = self::getCanonicalFilename($filename); $keys = array_keys(self::$filteredFiles); @@ -138,13 +138,13 @@ } /** - * Filters source lines from PHPUnit classes. - * - * @param array - * @return array - * @access public - * @static - */ + * Filters source lines from PHPUnit classes. + * + * @param array + * @return array + * @access public + * @static + */ public static function getFilteredCodeCoverage($codeCoverageInformation) { $files = array_keys($codeCoverageInformation); @@ -158,13 +158,13 @@ } /** - * Filters stack frames from PHPUnit classes. - * - * @param Exception $e - * @return string - * @access public - * @static - */ + * Filters stack frames from PHPUnit classes. + * + * @param Exception $e + * @return string + * @access public + * @static + */ public static function getFilteredStacktrace(Exception $e) { $filteredStacktrace = ''; $stacktrace = $e->getTrace(); @@ -186,13 +186,13 @@ } /** - * Canonicalizes a source file name. - * - * @param string $filename - * @return string - * @access protected - * @static - */ + * Canonicalizes a source file name. + * + * @param string $filename + * @return string + * @access protected + * @static + */ protected static function getCanonicalFilename($filename) { foreach (array('PHPUnit2', 'Benchmark', 'Console', 'PEAR') as $package) { $pos = strpos($filename, $package); @@ -211,12 +211,12 @@ } /** - * @param string $filename - * @return boolean - * @access protected - * @static - * @since Method available since Release 2.1.3 - */ + * @param string $filename + * @return boolean + * @access protected + * @static + * @since Method available since Release 2.1.3 + */ protected static function isFiltered($filename) { if (substr($filename, -7) == 'phpunit' || in_array(self::getCanonicalFilename($filename), self::$filteredFiles)) { http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Printer.php?r1=1.9&r2=1.10&ty=u Index: pear/PHPUnit2/Util/Printer.php diff -u pear/PHPUnit2/Util/Printer.php:1.9 pear/PHPUnit2/Util/Printer.php:1.10 --- pear/PHPUnit2/Util/Printer.php:1.9 Mon Apr 11 03:45:33 2005 +++ pear/PHPUnit2/Util/Printer.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Printer.php,v 1.9 2005/04/11 07:45:33 sebastian Exp $ + * @version CVS: $Id: Printer.php,v 1.10 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -35,17 +35,17 @@ */ abstract class PHPUnit2_Util_Printer { /** - * @var resource - * @access private - */ + * @var resource + * @access private + */ private $out; /** - * Constructor. - * - * @param mixed $out - * @access public - */ + * Constructor. + * + * @param mixed $out + * @access public + */ public function __construct($out = NULL) { if ($out === NULL) { $this->out = fopen('php://stdout', 'r'); @@ -61,18 +61,18 @@ } /** - * Destructor. - * - * @access public - */ + * Destructor. + * + * @access public + */ public function __destruct() { fclose($this->out); } /** - * @param string $buffer - * @access public - */ + * @param string $buffer + * @access public + */ public function write($buffer) { fputs($this->out, $buffer); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Skeleton.php?r1=1.21&r2=1.22&ty=u Index: pear/PHPUnit2/Util/Skeleton.php diff -u pear/PHPUnit2/Util/Skeleton.php:1.21 pear/PHPUnit2/Util/Skeleton.php:1.22 --- pear/PHPUnit2/Util/Skeleton.php:1.21 Sat Apr 16 13:16:37 2005 +++ pear/PHPUnit2/Util/Skeleton.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Skeleton.php,v 1.21 2005/04/16 17:16:37 sebastian Exp $ + * @version CVS: $Id: Skeleton.php,v 1.22 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -72,31 +72,31 @@ */ class {className}Test extends PHPUnit2_Framework_TestCase { /** - * Runs the test methods of this class. - * - * @access public - * @static - */ + * Runs the test methods of this class. + * + * @access public + * @static + */ public static function main() { $suite = new PHPUnit2_Framework_TestSuite("{className}Test"); $result = PHPUnit2_TextUI_TestRunner::run($suite); } /** - * Sets up the fixture, for example, open a network connection. - * This method is called before a test is executed. - * - * @access protected - */ + * Sets up the fixture, for example, open a network connection. + * This method is called before a test is executed. + * + * @access protected + */ protected function setUp() { } /** - * Tears down the fixture, for example, close a network connection. - * This method is called after a test is executed. - * - * @access protected - */ + * Tears down the fixture, for example, close a network connection. + * This method is called after a test is executed. + * + * @access protected + */ protected function tearDown() { } '; @@ -114,8 +114,8 @@ protected $templateMethod = ' /** - * @todo Implement test{methodName}(). - */ + * @todo Implement test{methodName}(). + */ public function test{methodName}() { // Remove the following line when you implement this test. throw new PHPUnit2_Framework_IncompleteTestError; @@ -123,25 +123,25 @@ '; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $className; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $classSourceFile; /** - * Constructor. - * - * @param string $className - * @param string $classSourceFile - * @throws RuntimeException - * @access public - */ + * Constructor. + * + * @param string $className + * @param string $classSourceFile + * @throws RuntimeException + * @access public + */ public function __construct($className, $classSourceFile = '') { if ($classSourceFile == '') { $classSourceFile = $className . '.php'; @@ -163,11 +163,11 @@ } /** - * Generates the test class' source. - * - * @return string - * @access public - */ + * Generates the test class' source. + * + * @return string + * @access public + */ public function generate() { $testClassSource = $this->testClassHeader($this->className, $this->classSourceFile); @@ -189,11 +189,11 @@ } /** - * Generates the test class and writes it to a source file. - * - * @param string $file - * @access public - */ + * Generates the test class and writes it to a source file. + * + * @param string $file + * @access public + */ public function write($file = '') { if ($file == '') { $file = $this->className . 'Test.php'; @@ -206,14 +206,14 @@ } /** - * Sets the templates for class header, class footer, and method. - * - * @param string $classHeader - * @param string $classFooter - * @param string $method - * @access public - * @since Method available since Release 2.2.0 - */ + * Sets the templates for class header, class footer, and method. + * + * @param string $classHeader + * @param string $classFooter + * @param string $method + * @access public + * @since Method available since Release 2.2.0 + */ public function setTemplates($classHeader, $classFooter, $method) { if (is_file($classHeader)) { $this->templateClassHeader = file_get_contents($classHeader); @@ -235,10 +235,10 @@ } /** - * @param string $className - * @param string $classSourceFile - * @access protected - */ + * @param string $className + * @param string $classSourceFile + * @access protected + */ protected function testClassHeader($className, $classSourceFile) { return str_replace( array( @@ -258,9 +258,9 @@ } /** - * @param string $className - * @access protected - */ + * @param string $className + * @access protected + */ protected function testClassFooter($className) { return str_replace( array( @@ -274,9 +274,9 @@ } /** - * @param string $methodName - * @access protected - */ + * @param string $methodName + * @access protected + */ protected function testMethod($methodName) { return str_replace( array( http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer.php?r1=1.7&r2=1.8&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.7 pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8 --- pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.7 Tue May 24 05:43:36 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Renderer.php,v 1.7 2005/05/24 09:43:36 sebastian Exp $ + * @version CVS: $Id: Renderer.php,v 1.8 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -37,48 +37,48 @@ */ abstract class PHPUnit2_Util_CodeCoverage_Renderer { /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $codeCoverageInformation; /** - * @var boolean - * @access protected - */ + * @var boolean + * @access protected + */ protected $useSummary = TRUE; /** - * Constructor. - * - * @param array $codeCoverageInformation - * @access protected - */ + * Constructor. + * + * @param array $codeCoverageInformation + * @access protected + */ protected function __construct($codeCoverageInformation) { $this->codeCoverageInformation = $codeCoverageInformation; } /** - * Abstract Factory. - * - * @param string $rendererName - * @param array $codeCoverageInformation - * @throws RuntimeException - * @access public - */ + * Abstract Factory. + * + * @param string $rendererName + * @param array $codeCoverageInformation + * @throws RuntimeException + * @access public + */ public function factory($rendererName, $codeCoverageInformation) { $class = 'PHPUnit2_Util_CodeCoverage_Renderer_' . $rendererName; return new $class($codeCoverageInformation); } /** - * Visualizes the result array of - * PHPUnit2_Framework_TestResult::getCodeCoverageInformation(). - * - * @return string - * @access public - * @final - */ + * Visualizes the result array of + * PHPUnit2_Framework_TestResult::getCodeCoverageInformation(). + * + * @return string + * @access public + * @final + */ public final function render() { $buffer = $this->header(); @@ -95,14 +95,14 @@ } /** - * Visualizes the result array of - * PHPUnit2_Framework_TestResult::getCodeCoverageInformation() - * and writes it to a file. - * - * @param string $filename - * @access public - * @since Method available since Release 2.2.0 - */ + * Visualizes the result array of + * PHPUnit2_Framework_TestResult::getCodeCoverageInformation() + * and writes it to a file. + * + * @param string $filename + * @access public + * @since Method available since Release 2.2.0 + */ public function renderToFile($filename) { if ($fp = fopen($filename, 'w')) { fputs( @@ -115,25 +115,25 @@ } /** - * Returns summarized Code Coverage data. - * - * Format of the result array: - * - * <code> - * array( - * "/tested/code.php" => array( - * linenumber => flag - * ) - * ) - * </code> - * - * flag > 1: line was executed. - * flag < 1: line is executable but was not executed. - * - * @return array - * @access protected - * @since Method available since Release 2.2.0 - */ + * Returns summarized Code Coverage data. + * + * Format of the result array: + * + * <code> + * array( + * "/tested/code.php" => array( + * linenumber => flag + * ) + * ) + * </code> + * + * flag > 1: line was executed. + * flag < 1: line is executable but was not executed. + * + * @return array + * @access protected + * @since Method available since Release 2.2.0 + */ protected function getSummary() { $summary = array(); @@ -155,44 +155,44 @@ } /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function header() { } /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function footer() { } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function startSourceFile($sourceFile) { } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function endSourceFile($sourceFile) { } /** - * @param array $codeLines - * @param array $executedLines - * @return string - * @access protected - * @abstract - */ + * @param array $codeLines + * @param array $executedLines + * @return string + * @access protected + * @abstract + */ abstract protected function renderSourceFile($codeLines, $executedLines); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php?r1=1.6&r2=1.7&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php:1.6 pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php:1.7 --- pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php:1.6 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer/HTML.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: HTML.php,v 1.6 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: HTML.php,v 1.7 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -84,47 +84,47 @@ '; /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function header() { return self::pageHeader; } /** - * @return string - * @access protected - * @since Method available since Release 2.1.1 - */ + * @return string + * @access protected + * @since Method available since Release 2.1.1 + */ protected function footer() { return self::pageFooter; } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function startSourceFile($sourceFile) { return self::sourceFileHeader; } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function endSourceFile($sourceFile) { return self::sourceFileFooter; } /** - * @param array $codeLines - * @param array $executedLines - * @return string - * @access protected - */ + * @param array $codeLines + * @param array $executedLines + * @return string + * @access protected + */ protected function renderSourceFile($codeLines, $executedLines) { $buffer = ''; $line = 1; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php?r1=1.5&r2=1.6&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.5 pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.6 --- pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.5 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Text.php,v 1.5 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: Text.php,v 1.6 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -36,29 +36,29 @@ */ class PHPUnit2_Util_CodeCoverage_Renderer_Text extends PHPUnit2_Util_CodeCoverage_Renderer { /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function startSourceFile($sourceFile) { return ' ' . $sourceFile . "\n\n"; } /** - * @param string $sourceFile - * @return string - * @access protected - */ + * @param string $sourceFile + * @return string + * @access protected + */ protected function endSourceFile($sourceFile) { return "\n"; } /** - * @param array $codeLines - * @param array $executedLines - * @return string - * @access protected - */ + * @param array $codeLines + * @param array $executedLines + * @return string + * @access protected + */ protected function renderSourceFile($codeLines, $executedLines) { $buffer = ''; $line = 1; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Log/PEAR.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/Log/PEAR.php diff -u pear/PHPUnit2/Util/Log/PEAR.php:1.1 pear/PHPUnit2/Util/Log/PEAR.php:1.2 --- pear/PHPUnit2/Util/Log/PEAR.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/Log/PEAR.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PEAR.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: PEAR.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -38,38 +38,38 @@ */ class PHPUnit2_Util_Log_PEAR implements PHPUnit2_Framework_TestListener { /** - * Log. - * - * @var Log - * @access private - */ + * Log. + * + * @var Log + * @access private + */ private $log; /** - * @param string $type The type of concrete Log subclass to use. - * Currently, valid values are 'console', - * 'syslog', 'sql', 'file', and 'mcal'. - * @param string $name The name of the actually log file, table, or - * other specific store to use. Defaults to an - * empty string, with which the subclass will - * attempt to do something intelligent. - * @param string $ident The identity reported to the log system. - * @param array $conf A hash containing any additional configuration - * information that a subclass might need. - * @param int $maxLevel Maximum priority level at which to log. - * @access public - */ + * @param string $type The type of concrete Log subclass to use. + * Currently, valid values are 'console', + * 'syslog', 'sql', 'file', and 'mcal'. + * @param string $name The name of the actually log file, table, or + * other specific store to use. Defaults to an + * empty string, with which the subclass will + * attempt to do something intelligent. + * @param string $ident The identity reported to the log system. + * @param array $conf A hash containing any additional configuration + * information that a subclass might need. + * @param int $maxLevel Maximum priority level at which to log. + * @access public + */ public function __construct($type, $name = '', $ident = '', $conf = array(), $maxLevel = PEAR_LOG_DEBUG) { $this->log = Log::factory($type, $name, $ident, $conf, $maxLevel); } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->log->crit( sprintf( @@ -82,12 +82,12 @@ } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->log->err( sprintf( @@ -100,12 +100,12 @@ } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->log->info( sprintf( @@ -118,12 +118,12 @@ } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { $this->log->info( sprintf( @@ -135,12 +135,12 @@ } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A test suite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { $this->log->info( sprintf( @@ -152,11 +152,11 @@ } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $this->log->info( sprintf( @@ -168,11 +168,11 @@ } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $this->log->info( sprintf( http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Log/XML.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/Log/XML.php diff -u pear/PHPUnit2/Util/Log/XML.php:1.1 pear/PHPUnit2/Util/Log/XML.php:1.2 --- pear/PHPUnit2/Util/Log/XML.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/Log/XML.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: XML.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: XML.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -38,77 +38,77 @@ */ class PHPUnit2_Util_Log_XML extends PHPUnit2_Util_Printer implements PHPUnit2_Framework_TestListener { /** - * @var DOMDocument - * @access private - */ + * @var DOMDocument + * @access private + */ private $document; /** - * @var DOMElement - * @access private - */ + * @var DOMElement + * @access private + */ private $root; /** - * @var boolean - * @access private - */ + * @var boolean + * @access private + */ private $writeDocument = TRUE; /** - * @var DOMElement[] - * @access private - */ + * @var DOMElement[] + * @access private + */ private $testSuites = array(); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteTests = array(0); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteErrors = array(0); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteFailures = array(0); /** - * @var integer[] - * @access private - */ + * @var integer[] + * @access private + */ private $testSuiteTimes = array(0); /** - * @var integer - * @access private - */ + * @var integer + * @access private + */ private $testSuiteLevel = 0; /** - * @var DOMElement - * @access private - */ + * @var DOMElement + * @access private + */ private $currentTestCase = NULL; /** - * @var Benchmark_Timer - * @access private - */ + * @var Benchmark_Timer + * @access private + */ private $timer; /** - * Constructor. - * - * @param mixed $out - * @access public - */ + * Constructor. + * + * @param mixed $out + * @access public + */ public function __construct($out = NULL) { $this->document = new DOMDocument('1.0', 'UTF-8'); $this->document->formatOutput = TRUE; @@ -122,10 +122,10 @@ } /** - * Destructor. - * - * @access public - */ + * Destructor. + * + * @access public + */ public function __destruct() { if ($this->writeDocument === TRUE) { $this->write($this->getXML()); @@ -135,12 +135,12 @@ } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $error = $this->document->createElement('error', PHPUnit2_Util_Filter::getFilteredStacktrace($e)); $error->setAttribute('message', $e->getMessage()); @@ -152,12 +152,12 @@ } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $failure = $this->document->createElement('failure', PHPUnit2_Util_Filter::getFilteredStacktrace($e)); $failure->setAttribute('message', $e->getMessage()); @@ -169,12 +169,12 @@ } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $error = $this->document->createElement('error', PHPUnit2_Util_Filter::getFilteredStacktrace($e)); $error->setAttribute('message', 'Incomplete Test'); @@ -186,12 +186,12 @@ } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { $testSuite = $this->document->createElement('testsuite'); $testSuite->setAttribute('name', $suite->getName()); @@ -231,12 +231,12 @@ } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { $this->testSuites[$this->testSuiteLevel]->setAttribute('tests', $this->testSuiteTests[$this->testSuiteLevel]); $this->testSuites[$this->testSuiteLevel]->setAttribute('failures', $this->testSuiteFailures[$this->testSuiteLevel]); @@ -254,11 +254,11 @@ } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $testCase = $this->document->createElement('testcase'); $testCase->setAttribute('name', $test->getName()); @@ -273,11 +273,11 @@ } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $this->timer->stop(); $time = $this->timer->timeElapsed(); @@ -289,27 +289,27 @@ } /** - * Returns the XML as a string. - * - * @return string - * @access public - * @since Method available since Release 2.2.0 - */ + * Returns the XML as a string. + * + * @return string + * @access public + * @since Method available since Release 2.2.0 + */ public function getXML() { return $this->document->saveXML(); } /** - * Enables or disables the writing of the document - * in __destruct(). - * - * This is a "hack" needed for the integration of - * PHPUnit with Phing. - * - * @return string - * @access public - * @since Method available since Release 2.2.0 - */ + * Enables or disables the writing of the document + * in __destruct(). + * + * This is a "hack" needed for the integration of + * PHPUnit with Phing. + * + * @return string + * @access public + * @since Method available since Release 2.2.0 + */ public function setWriteDocument($flag) { if (is_bool($flag)) { $this->writeDocument = $flag; http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/NamePrettifier.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/NamePrettifier.php diff -u pear/PHPUnit2/Util/TestDox/NamePrettifier.php:1.1 pear/PHPUnit2/Util/TestDox/NamePrettifier.php:1.2 --- pear/PHPUnit2/Util/TestDox/NamePrettifier.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/NamePrettifier.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: NamePrettifier.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: NamePrettifier.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -34,24 +34,24 @@ */ class PHPUnit2_Util_TestDox_NamePrettifier { /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $prefix = 'Test'; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $suffix = 'Test'; /** - * Tests if a method is a test method. - * - * @param string $testMethodName - * @return boolean - * @access public - */ + * Tests if a method is a test method. + * + * @param string $testMethodName + * @return boolean + * @access public + */ public function isATestMethod($testMethodName) { if (substr($testMethodName, 0, 4) == 'test') { return TRUE; @@ -61,12 +61,12 @@ } /** - * Prettifies the name of a test class. - * - * @param string $testClassName - * @return string - * @access public - */ + * Prettifies the name of a test class. + * + * @param string $testClassName + * @return string + * @access public + */ public function prettifyTestClass($testClassName) { $title = $testClassName; @@ -84,12 +84,12 @@ } /** - * Prettifies the name of a test method. - * - * @param string $testMethodName - * @return string - * @access public - */ + * Prettifies the name of a test method. + * + * @param string $testMethodName + * @return string + * @access public + */ public function prettifyTestMethod($testMethodName) { $buffer = ''; @@ -109,21 +109,21 @@ } /** - * Sets the prefix of test names. - * - * @param string $prefix - * @access public - */ + * Sets the prefix of test names. + * + * @param string $prefix + * @access public + */ public function setPrefix($prefix) { $this->prefix = $prefix; } /** - * Sets the suffix of test names. - * - * @param string $prefix - * @access public - */ + * Sets the suffix of test names. + * + * @param string $prefix + * @access public + */ public function setSuffix($suffix) { $this->suffix = $suffix; } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.1 pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ResultPrinter.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: ResultPrinter.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -37,35 +37,35 @@ */ abstract class PHPUnit2_Util_TestDox_ResultPrinter extends PHPUnit2_Util_Printer implements PHPUnit2_Framework_TestListener { /** - * @var PHPUnit2_Util_TestDox_NamePrettifier - * @access protected - */ + * @var PHPUnit2_Util_TestDox_NamePrettifier + * @access protected + */ protected $prettifier; /** - * @var string - * @access protected - */ + * @var string + * @access protected + */ protected $testClass = ''; /** - * @var boolean - * @access protected - */ + * @var boolean + * @access protected + */ protected $testFailed = FALSE; /** - * @var array - * @access protected - */ + * @var array + * @access protected + */ protected $tests = array(); /** - * Constructor. - * - * @param resource $out - * @access public - */ + * Constructor. + * + * @param resource $out + * @access public + */ public function __construct($out = NULL) { parent::__construct($out); @@ -74,10 +74,10 @@ } /** - * Destructor. - * - * @access public - */ + * Destructor. + * + * @access public + */ public function __destruct() { $this->doEndClass(); $this->endRun(); @@ -86,78 +86,78 @@ } /** - * Abstract Factory. - * - * @param string $type - * @param resource $out - * @throws RuntimeException - * @access public - * @static - */ + * Abstract Factory. + * + * @param string $type + * @param resource $out + * @throws RuntimeException + * @access public + * @static + */ public static function factory($type, $out = NULL) { $class = 'PHPUnit2_Util_TestDox_ResultPrinter_' . $type; return new $class($out); } /** - * An error occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * An error occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addError(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed = TRUE; } /** - * A failure occurred. - * - * @param PHPUnit2_Framework_Test $test - * @param PHPUnit2_Framework_AssertionFailedError $e - * @access public - */ + * A failure occurred. + * + * @param PHPUnit2_Framework_Test $test + * @param PHPUnit2_Framework_AssertionFailedError $e + * @access public + */ public function addFailure(PHPUnit2_Framework_Test $test, PHPUnit2_Framework_AssertionFailedError $e) { $this->testFailed = TRUE; } /** - * Incomplete test. - * - * @param PHPUnit2_Framework_Test $test - * @param Exception $e - * @access public - */ + * Incomplete test. + * + * @param PHPUnit2_Framework_Test $test + * @param Exception $e + * @access public + */ public function addIncompleteTest(PHPUnit2_Framework_Test $test, Exception $e) { $this->testFailed = TRUE; } /** - * A testsuite started. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite started. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function startTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A testsuite ended. - * - * @param PHPUnit2_Framework_TestSuite $suite - * @access public - * @since Method available since Release 2.2.0 - */ + * A testsuite ended. + * + * @param PHPUnit2_Framework_TestSuite $suite + * @access public + * @since Method available since Release 2.2.0 + */ public function endTestSuite(PHPUnit2_Framework_TestSuite $suite) { } /** - * A test started. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test started. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function startTest(PHPUnit2_Framework_Test $test) { $class = get_class($test); @@ -176,11 +176,11 @@ } /** - * A test ended. - * - * @param PHPUnit2_Framework_Test $test - * @access public - */ + * A test ended. + * + * @param PHPUnit2_Framework_Test $test + * @access public + */ public function endTest(PHPUnit2_Framework_Test $test) { $prettifiedName = $this->prettifier->prettifyTestMethod($test->getName()); @@ -202,9 +202,9 @@ } /** - * @access private - * @since Method available since Release 2.3.0 - */ + * @access private + * @since Method available since Release 2.3.0 + */ private function doEndClass() { foreach ($this->tests as $name => $data) { if ($data['failures'] == 0) { @@ -216,45 +216,45 @@ } /** - * Handler for 'start run' event. - * - * @access protected - */ + * Handler for 'start run' event. + * + * @access protected + */ protected function startRun() { } /** - * Handler for 'start class' event. - * - * @param string $name - * @access protected - * @abstract - */ + * Handler for 'start class' event. + * + * @param string $name + * @access protected + * @abstract + */ abstract protected function startClass($name); /** - * Handler for 'on test' event. - * - * @param string $name - * @access protected - * @abstract - */ + * Handler for 'on test' event. + * + * @param string $name + * @access protected + * @abstract + */ abstract protected function onTest($name); /** - * Handler for 'end class' event. - * - * @param string $name - * @access protected - * @abstract - */ + * Handler for 'end class' event. + * + * @param string $name + * @access protected + * @abstract + */ abstract protected function endClass($name); /** - * Handler for 'end run' event. - * - * @access protected - */ + * Handler for 'end run' event. + * + * @access protected + */ protected function endRun() { } } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php:1.1 pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php:1.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter/HTML.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: HTML.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: HTML.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -36,49 +36,49 @@ */ class PHPUnit2_Util_TestDox_ResultPrinter_HTML extends PHPUnit2_Util_TestDox_ResultPrinter { /** - * Handler for 'start run' event. - * - * @access protected - */ + * Handler for 'start run' event. + * + * @access protected + */ protected function startRun() { $this->write('<html><body>'); } /** - * Handler for 'start class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'start class' event. + * + * @param string $name + * @access protected + */ protected function startClass($name) { $this->write('<h2>' . $name . '</h2><ul>'); } /** - * Handler for 'on test' event. - * - * @param string $name - * @access protected - */ + * Handler for 'on test' event. + * + * @param string $name + * @access protected + */ protected function onTest($name) { $this->write('<li>' . $name . '</li>'); } /** - * Handler for 'end class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'end class' event. + * + * @param string $name + * @access protected + */ protected function endClass($name) { $this->write('</ul>'); } /** - * Handler for 'end run' event. - * - * @access protected - */ + * Handler for 'end run' event. + * + * @access protected + */ protected function endRun() { $this->write('</body></html>'); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php?r1=1.1&r2=1.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php:1.1 pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php:1.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php:1.1 Tue May 24 05:43:37 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter/Text.php Thu May 26 12:05:37 2005 @@ -15,7 +15,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2005 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Text.php,v 1.1 2005/05/24 09:43:37 sebastian Exp $ + * @version CVS: $Id: Text.php,v 1.2 2005/05/26 16:05:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -36,31 +36,31 @@ */ class PHPUnit2_Util_TestDox_ResultPrinter_Text extends PHPUnit2_Util_TestDox_ResultPrinter { /** - * Handler for 'start class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'start class' event. + * + * @param string $name + * @access protected + */ protected function startClass($name) { $this->write($name . "\n"); } /** - * Handler for 'on test' event. - * - * @param string $name - * @access protected - */ + * Handler for 'on test' event. + * + * @param string $name + * @access protected + */ protected function onTest($name) { $this->write(' - ' . $name . "\n"); } /** - * Handler for 'end class' event. - * - * @param string $name - * @access protected - */ + * Handler for 'end class' event. + * + * @param string $name + * @access protected + */ protected function endClass($name) { $this->write("\n"); }