cvs: pear(PHPUNIT_2_3) /PHPUnit2 package.xml /PHPUnit2/Extensions ExceptionTestCase.php PerformanceTestCase.php RepeatedTest.php TestDecorator.php
TestSetup.php /PHPUnit2/Framework Assert.php TestCase.php TestResult.php TestSuite.php /PHPUnit2/Runner IncludePathTestCollector.php
StandardTestSuiteLoader.php /PHPUnit2/Samples/BankAccount BankAccount.php BankAccountTest.php /PHPUnit2/Tests/Extensions ExceptionTestCaseTest.php
/PHPUnit2/TextUI TestRunner.php /PHPUnit2/Util Fileloader.php Skeleton.php /PHPUnit2/Util/CodeCoverage Renderer.php /PHPUnit2/Util/TestDox
ResultPrinter.php
| From: | Sebastian Bergmann | Date: | Wed, 12 Oct 2005 17:07:08 +0000 |
| Subject: | cvs: pear(PHPUNIT_2_3) /PHPUnit2 package.xml /PHPUnit2/Extensions ExceptionTestCase.php PerformanceTestCase.php RepeatedTest.php TestDecorator.php TestSetup.php /PHPUnit2/Framework Assert.php TestCase.php TestResult.php TestSuite.php /PHPUnit2/Runner IncludePathTestCollector.php StandardTestSuiteLoader.php /PHPUnit2/Samples/BankAccount BankAccount.php BankAccountTest.php /PHPUnit2/Tests/Extensions ExceptionTestCaseTest.php /PHPUnit2/TextUI TestRunner.php /PHPUnit2/Util Fileloader.php Skeleton.php /PHPUnit2/Util/CodeCoverage Renderer.php /PHPUnit2/Util/TestDox ResultPrinter.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-35458@lists.php.net to get a copy of this message | ||
sebastian Wed Oct 12 13:07:08 2005 EDT
Modified files: (Branch: PHPUNIT_2_3)
/pear/PHPUnit2 package.xml
/pear/PHPUnit2/Extensions ExceptionTestCase.php
PerformanceTestCase.php RepeatedTest.php
TestDecorator.php TestSetup.php
/pear/PHPUnit2/Framework Assert.php TestCase.php TestResult.php
TestSuite.php
/pear/PHPUnit2/Runner IncludePathTestCollector.php
StandardTestSuiteLoader.php
/pear/PHPUnit2/Samples/BankAccount BankAccount.php
BankAccountTest.php
/pear/PHPUnit2/Tests/Extensions ExceptionTestCaseTest.php
/pear/PHPUnit2/TextUI TestRunner.php
/pear/PHPUnit2/Util Fileloader.php Skeleton.php
/pear/PHPUnit2/Util/CodeCoverage Renderer.php
/pear/PHPUnit2/Util/TestDox ResultPrinter.php
Log:
Restore compatibility with PHP 5.0.
http://cvs.php.net/diff.php/pear/PHPUnit2/package.xml?r1=1.113.2.17&r2=1.113.2.18&ty=u Index: pear/PHPUnit2/package.xml diff -u pear/PHPUnit2/package.xml:1.113.2.17 pear/PHPUnit2/package.xml:1.113.2.18 --- pear/PHPUnit2/package.xml:1.113.2.17 Wed Oct 12 12:12:17 2005 +++ pear/PHPUnit2/package.xml Wed Oct 12 13:07:05 2005 @@ -13,8 +13,8 @@ </maintainers> <license>PHP License</license> <release> - <version>2.3.0beta6</version> - <state>beta</state> + <version>2.3.0</version> + <state>stable</state> <date>2005-10-12</date> <notes><![CDATA[ + Added PHPUnit2_Framework_Assert::assertNotEquals(). @@ -41,8 +41,6 @@ * PHPUnit2_Extensions_TestDox_NamePrettifier now removes digits from the end of test method names and PHPUnit2_Extensions_TestDox_ResultPrinter treats test methods like testBalanceCannotBecomeNegative() and testBalanceCannotBecomeNegative2() as one and prints "Balance cannot become negative" only once. -* PHPUnit2 now uses the Standard PHP Library (SPL)'s specialized exceptions InvalidArgumentException and RuntimeException instead of the generic Exception exception class. - * Renamed Extensions_CodeCoverage_*, Extensions_Log_*, and Extensions_TestDox_* to Util_CodeCoverage_*, Util_Log_*, and Util_TestDox_* as the Extensions_* namespace is intended for extensions of the framework. * Stacktraces for failed tests now show the failing assertion. @@ -52,8 +50,6 @@ * Implemented RFE #4456. * Moved tests outside of installation directory. - -! PHP 5.1.0 (or greater) is now required. ]]></notes> <filelist> <dir name="/" baseinstalldir="PHPUnit2"> http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/ExceptionTestCase.php?r1=1.15.2.1&r2=1.15.2.2&ty=u Index: pear/PHPUnit2/Extensions/ExceptionTestCase.php diff -u pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15.2.1 pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15.2.2 --- pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15.2.1 Fri Sep 9 03:58:59 2005 +++ pear/PHPUnit2/Extensions/ExceptionTestCase.php Wed Oct 12 13:07:06 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.15.2.1 2005/09/09 07:58:59 sebastian Exp $ + * @version CVS: $Id: ExceptionTestCase.php,v 1.15.2.2 2005/10/12 17:07:06 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -54,7 +54,7 @@ /** * @param string $exceptionName - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.2.0 */ @@ -62,7 +62,7 @@ if (is_string($exceptionName) && class_exists($exceptionName)) { $this->expectedException = $exceptionName; } else { - throw new InvalidArgumentException; + throw new Exception; } } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/PerformanceTestCase.php?r1=1.15.2.2&r2=1.15.2.3&ty=u Index: pear/PHPUnit2/Extensions/PerformanceTestCase.php diff -u pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15.2.2 pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15.2.3 --- pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15.2.2 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/PerformanceTestCase.php Wed Oct 12 13:07:06 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.15.2.2 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: PerformanceTestCase.php,v 1.15.2.3 2005/10/12 17:07:06 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -69,7 +69,7 @@ /** * @param integer $maxRunningTime - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 */ @@ -78,7 +78,7 @@ $maxRunningTime >= 0) { $this->maxRunningTime = $maxRunningTime; } else { - throw new InvalidArgumentException; + throw new Exception; } } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/RepeatedTest.php?r1=1.15.2.1&r2=1.15.2.2&ty=u Index: pear/PHPUnit2/Extensions/RepeatedTest.php diff -u pear/PHPUnit2/Extensions/RepeatedTest.php:1.15.2.1 pear/PHPUnit2/Extensions/RepeatedTest.php:1.15.2.2 --- pear/PHPUnit2/Extensions/RepeatedTest.php:1.15.2.1 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/RepeatedTest.php Wed Oct 12 13:07:06 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.15.2.1 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: RepeatedTest.php,v 1.15.2.2 2005/10/12 17:07:06 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -46,7 +46,7 @@ * * @param PHPUnit2_Framework_Test $test * @param integer $timesRepeat - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function __construct(PHPUnit2_Framework_Test $test, $timesRepeat = 1) { @@ -56,7 +56,7 @@ $timesRepeat >= 0) { $this->timesRepeat = $timesRepeat; } else { - throw new InvalidArgumentException( + throw new Exception( 'Argument 2 must be a positive integer.' ); } @@ -79,7 +79,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -89,7 +89,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestDecorator.php?r1=1.14.2.1&r2=1.14.2.2&ty=u Index: pear/PHPUnit2/Extensions/TestDecorator.php diff -u pear/PHPUnit2/Extensions/TestDecorator.php:1.14.2.1 pear/PHPUnit2/Extensions/TestDecorator.php:1.14.2.2 --- pear/PHPUnit2/Extensions/TestDecorator.php:1.14.2.1 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/TestDecorator.php Wed Oct 12 13:07:07 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.14.2.1 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: TestDecorator.php,v 1.14.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -117,7 +117,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -127,7 +127,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestSetup.php?r1=1.13.2.3&r2=1.13.2.4&ty=u Index: pear/PHPUnit2/Extensions/TestSetup.php diff -u pear/PHPUnit2/Extensions/TestSetup.php:1.13.2.3 pear/PHPUnit2/Extensions/TestSetup.php:1.13.2.4 --- pear/PHPUnit2/Extensions/TestSetup.php:1.13.2.3 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/TestSetup.php Wed Oct 12 13:07:07 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.13.2.3 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: TestSetup.php,v 1.13.2.4 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -44,7 +44,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -54,7 +54,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Assert.php?r1=1.45.2.1&r2=1.45.2.2&ty=u Index: pear/PHPUnit2/Framework/Assert.php diff -u pear/PHPUnit2/Framework/Assert.php:1.45.2.1 pear/PHPUnit2/Framework/Assert.php:1.45.2.2 --- pear/PHPUnit2/Framework/Assert.php:1.45.2.1 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Framework/Assert.php Wed Oct 12 13:07:07 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.45.2.1 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: Assert.php,v 1.45.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -85,7 +85,7 @@ * @param mixed $haystack * @param boolean $condition * @param string $message - * @throws InvalidArgumentException + * @throws Exception * @access private * @static * @since Method available since Release 2.2.0 @@ -110,7 +110,7 @@ } else { - throw new InvalidArgumentException; + throw new Exception; } if ($condition && !$found) { @@ -226,7 +226,7 @@ * * @param boolean $condition * @param string $message - * @throws InvalidArgumentException + * @throws Exception * @access public * @static */ @@ -236,7 +236,7 @@ self::fail($message); } } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -245,7 +245,7 @@ * * @param boolean $condition * @param string $message - * @throws InvalidArgumentException + * @throws Exception * @access public * @static */ @@ -253,7 +253,7 @@ if (is_bool($condition)) { self::assertTrue(!$condition, $message); } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -357,7 +357,7 @@ */ private static function doAssertType($expected, $actual, $condition, $message) { if (!is_string($expected)) { - throw new InvalidArgumentException; + throw new Exception; } if (is_object($actual)) { @@ -421,7 +421,7 @@ */ private static function doAssertRegExp($pattern, $string, $condition, $message) { if (!is_string($pattern) || !is_string($string)) { - throw new InvalidArgumentException; + throw new Exception; } $result = preg_match($pattern, $string); http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestCase.php?r1=1.32.2.2&r2=1.32.2.3&ty=u Index: pear/PHPUnit2/Framework/TestCase.php diff -u pear/PHPUnit2/Framework/TestCase.php:1.32.2.2 pear/PHPUnit2/Framework/TestCase.php:1.32.2.3 --- pear/PHPUnit2/Framework/TestCase.php:1.32.2.2 Fri Sep 9 03:59:01 2005 +++ pear/PHPUnit2/Framework/TestCase.php Wed Oct 12 13:07:07 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.32.2.2 2005/09/09 07:59:01 sebastian Exp $ + * @version CVS: $Id: TestCase.php,v 1.32.2.3 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -146,7 +146,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -156,7 +156,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestResult.php?r1=1.32.2.1&r2=1.32.2.2&ty=u Index: pear/PHPUnit2/Framework/TestResult.php diff -u pear/PHPUnit2/Framework/TestResult.php:1.32.2.1 pear/PHPUnit2/Framework/TestResult.php:1.32.2.2 --- pear/PHPUnit2/Framework/TestResult.php:1.32.2.1 Fri Sep 9 03:59:01 2005 +++ pear/PHPUnit2/Framework/TestResult.php Wed Oct 12 13:07:07 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.32.2.1 2005/09/09 07:59:01 sebastian Exp $ + * @version CVS: $Id: TestResult.php,v 1.32.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -287,7 +287,7 @@ * Enables or disables the collection of Code Coverage information. * * @param boolean $flag - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 */ @@ -295,7 +295,7 @@ if (is_bool($flag)) { $this->collectCodeCoverageInformation = $flag; } else { - throw new InvalidArgumentException; + throw new Exception; } } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestSuite.php?r1=1.26.2.7&r2=1.26.2.8&ty=u Index: pear/PHPUnit2/Framework/TestSuite.php diff -u pear/PHPUnit2/Framework/TestSuite.php:1.26.2.7 pear/PHPUnit2/Framework/TestSuite.php:1.26.2.8 --- pear/PHPUnit2/Framework/TestSuite.php:1.26.2.7 Tue Sep 27 08:17:00 2005 +++ pear/PHPUnit2/Framework/TestSuite.php Wed Oct 12 13:07:07 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.26.2.7 2005/09/27 12:17:00 sebastian Exp $ + * @version CVS: $Id: TestSuite.php,v 1.26.2.8 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -100,7 +100,7 @@ * * @param mixed $theClass * @param string $name - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function __construct($theClass = '', $name = '') { @@ -127,7 +127,7 @@ } if (!$argumentsValid) { - throw new InvalidArgumentException; + throw new Exception; } if ($name != '') { @@ -220,14 +220,14 @@ * leaving the current test run untouched. * * @param string $filename - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 * @author Stefano F. Rausch <stefano@rausch-e.net> */ public function addTestFile($filename) { if (!is_string($filename) || !file_exists($filename)) { - throw new InvalidArgumentException; + throw new Exception; } $declaredClasses = get_declared_classes(); @@ -267,11 +267,11 @@ * Wrapper for addTestFile() that adds multiple test files. * * @param Array $filenames - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 */ - public function addTestFiles(Array $filenames) { + public function addTestFiles($filenames) { foreach ($filenames as $filename) { $this->addTestFile($filename); } @@ -366,7 +366,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -376,7 +376,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/IncludePathTestCollector.php?r1=1.13.2.2&r2=1.13.2.3&ty=u Index: pear/PHPUnit2/Runner/IncludePathTestCollector.php diff -u pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13.2.2 pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13.2.3 --- pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13.2.2 Fri Sep 9 03:59:02 2005 +++ pear/PHPUnit2/Runner/IncludePathTestCollector.php Wed Oct 12 13:07:07 2005 @@ -15,11 +15,68 @@ * @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.13.2.2 2005/09/09 07:59:02 sebastian Exp $ + * @version CVS: $Id: IncludePathTestCollector.php,v 1.13.2.3 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ +if (!class_exists('AppendIterator')) { + class AppendIterator implements Iterator { + private $iterators; + + public function __construct() { + $this->iterators = new ArrayIterator(); + } + + public function __call($func, $params) { + return call_user_func_array(array($this->getInnerIterator(), $func), $params); + } + + public function append(Iterator $it) { + $this->iterators->append($it); + } + + public function getInnerIterator() { + return $this->iterators->current(); + } + + public function rewind() { + $this->iterators->rewind(); + + if ($this->iterators->valid()) { + $this->getInnerIterator()->rewind(); + } + } + + public function valid() { + return $this->iterators->valid() && $this->getInnerIterator()->valid(); + } + + public function current() { + return $this->iterators->valid() ? $this->getInnerIterator()->current() : NULL; + } + + public function key() { + return $this->iterators->valid() ? $this->getInnerIterator()->key() : NULL; + } + + public function next() { + if (!$this->iterators->valid()) return; + $this->getInnerIterator()->next(); + + if ($this->getInnerIterator()->valid()) return; + $this->iterators->next(); + + while ($this->iterators->valid()) { + $this->getInnerIterator()->rewind(); + + if ($this->getInnerIterator()->valid()) return; + $this->iterators->next(); + } + } + } +} + require_once 'PHPUnit2/Runner/TestCollector.php'; require_once 'PEAR/Config.php'; http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/StandardTestSuiteLoader.php?r1=1.19.2.5&r2=1.19.2.6&ty=u Index: pear/PHPUnit2/Runner/StandardTestSuiteLoader.php diff -u pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19.2.5 pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19.2.6 --- pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19.2.5 Fri Sep 9 03:59:03 2005 +++ pear/PHPUnit2/Runner/StandardTestSuiteLoader.php Wed Oct 12 13:07:07 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.19.2.5 2005/09/09 07:59:03 sebastian Exp $ + * @version CVS: $Id: StandardTestSuiteLoader.php,v 1.19.2.6 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -42,7 +42,7 @@ * @param string $suiteClassName * @param string $suiteClassFile * @return ReflectionClass - * @throws RuntimeException + * @throws Exception * @access public */ public function load($suiteClassName, $suiteClassFile = '') { @@ -72,7 +72,7 @@ if (class_exists($suiteClassName)) { return new ReflectionClass($suiteClassName); } else { - throw new RuntimeException( + throw new Exception( sprintf( 'Class %s could not be found in %s.', http://cvs.php.net/diff.php/pear/PHPUnit2/Samples/BankAccount/BankAccount.php?r1=1.5.2.1&r2=1.5.2.2&ty=u Index: pear/PHPUnit2/Samples/BankAccount/BankAccount.php diff -u pear/PHPUnit2/Samples/BankAccount/BankAccount.php:1.5.2.1 pear/PHPUnit2/Samples/BankAccount/BankAccount.php:1.5.2.2 --- pear/PHPUnit2/Samples/BankAccount/BankAccount.php:1.5.2.1 Sun Jul 3 12:27:32 2005 +++ pear/PHPUnit2/Samples/BankAccount/BankAccount.php Wed Oct 12 13:07:07 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: BankAccount.php,v 1.5.2.1 2005/07/03 16:27:32 sebastian Exp $ + * @version CVS: $Id: BankAccount.php,v 1.5.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -55,14 +55,14 @@ * Sets the bank account's balance. * * @param float $balance - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function setBalance($balance) { if ($balance >= 0) { $this->balance = $balance; } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -70,14 +70,14 @@ * Deposits an amount of money to the bank account. * * @param float $balance - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function depositMoney($amount) { if ($amount >= 0) { $this->balance += $amount; } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -85,14 +85,14 @@ * Withdraws an amount of money from the bank account. * * @param float $balance - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function withdrawMoney($amount) { if ($amount >= 0 && $this->balance >= $amount) { $this->balance -= $amount; } else { - throw new InvalidArgumentException; + throw new Exception; } } } http://cvs.php.net/diff.php/pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php?r1=1.4.2.1&r2=1.4.2.2&ty=u Index: pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php diff -u pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php:1.4.2.1 pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php:1.4.2.2 --- pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php:1.4.2.1 Sun Jul 3 12:27:32 2005 +++ pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php Wed Oct 12 13:07:07 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: BankAccountTest.php,v 1.4.2.1 2005/07/03 16:27:32 sebastian Exp $ + * @version CVS: $Id: BankAccountTest.php,v 1.4.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -72,7 +72,7 @@ $this->ba->withdrawMoney(1); } - catch (InvalidArgumentException $e) { + catch (Exception $e) { return; } @@ -89,7 +89,7 @@ $this->ba->depositMoney(-1); } - catch (InvalidArgumentException $e) { + catch (Exception $e) { return; } @@ -106,7 +106,7 @@ $this->ba->setBalance(-1); } - catch (InvalidArgumentException $e) { + catch (Exception $e) { return; } http://cvs.php.net/diff.php/pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php?r1=1.12&r2=1.12.2.1&ty=u Index: pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php diff -u pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php:1.12 pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php:1.12.2.1 --- pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php:1.12 Thu May 5 11:47:15 2005 +++ pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php Wed Oct 12 13:07:07 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: ExceptionTestCaseTest.php,v 1.12 2005/05/05 15:47:15 sebastian Exp $ + * @version CVS: $Id: ExceptionTestCaseTest.php,v 1.12.2.1 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -60,7 +60,7 @@ public function testWrongException() { $test = new ThrowExceptionTestCase('test'); - $test->setExpectedException('RuntimeException'); + $test->setExpectedException('ReflectionException'); $result = $test->run(); http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/TestRunner.php?r1=1.64.2.2&r2=1.64.2.3&ty=u Index: pear/PHPUnit2/TextUI/TestRunner.php diff -u pear/PHPUnit2/TextUI/TestRunner.php:1.64.2.2 pear/PHPUnit2/TextUI/TestRunner.php:1.64.2.3 --- pear/PHPUnit2/TextUI/TestRunner.php:1.64.2.2 Fri Sep 9 03:59:03 2005 +++ pear/PHPUnit2/TextUI/TestRunner.php Wed Oct 12 13:07:08 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.64.2.2 2005/09/09 07:59:03 sebastian Exp $ + * @version CVS: $Id: TestRunner.php,v 1.64.2.3 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -96,7 +96,7 @@ /** * @param array $arguments - * @throws RuntimeException + * @throws Exception * @access protected */ protected function start($arguments) { @@ -271,7 +271,7 @@ } catch (Exception $e) { - throw new RuntimeException( + throw new Exception( 'Could not create and run test suite: ' . $e->getMessage() ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Fileloader.php?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: pear/PHPUnit2/Util/Fileloader.php diff -u pear/PHPUnit2/Util/Fileloader.php:1.1.2.2 pear/PHPUnit2/Util/Fileloader.php:1.1.2.3 --- pear/PHPUnit2/Util/Fileloader.php:1.1.2.2 Tue Jun 21 05:02:06 2005 +++ pear/PHPUnit2/Util/Fileloader.php Wed Oct 12 13:07:08 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: Fileloader.php,v 1.1.2.2 2005/06/21 09:02:06 sebastian Exp $ + * @version CVS: $Id: Fileloader.php,v 1.1.2.3 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -38,7 +38,7 @@ * If that is the case, the sourcefile is loaded through include_once(). * * @param string $filename - * @throws RuntimeException + * @throws Exception * @access public * @static */ @@ -48,7 +48,7 @@ } if (!is_readable($filename)) { - throw new RuntimeException( + throw new Exception( sprintf( '%s could not be found or is not readable.', @@ -60,7 +60,7 @@ $output = shell_exec('php -l ' . $filename); if (strpos($output, 'No syntax errors detected in') === FALSE) { - throw new RuntimeException( + throw new Exception( sprintf( 'Syntax error in %s.', http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Skeleton.php?r1=1.24&r2=1.24.2.1&ty=u Index: pear/PHPUnit2/Util/Skeleton.php diff -u pear/PHPUnit2/Util/Skeleton.php:1.24 pear/PHPUnit2/Util/Skeleton.php:1.24.2.1 --- pear/PHPUnit2/Util/Skeleton.php:1.24 Fri Jun 3 01:47:01 2005 +++ pear/PHPUnit2/Util/Skeleton.php Wed Oct 12 13:07:08 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.24 2005/06/03 05:47:01 sebastian Exp $ + * @version CVS: $Id: Skeleton.php,v 1.24.2.1 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -140,7 +140,7 @@ * * @param string $className * @param string $classSourceFile - * @throws RuntimeException + * @throws Exception * @access public */ public function __construct($className, $classSourceFile = '') { @@ -151,7 +151,7 @@ if (file_exists($classSourceFile)) { $this->classSourceFile = $classSourceFile; } else { - throw new RuntimeException( + throw new Exception( sprintf( 'Could not open %s.', @@ -165,7 +165,7 @@ if (class_exists($className)) { $this->className = $className; } else { - throw new RuntimeException( + throw new Exception( sprintf( 'Could not find class "%s" in %s.', http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer.php?r1=1.8.2.3&r2=1.8.2.4&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8.2.3 pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8.2.4 --- pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8.2.3 Mon Sep 19 09:45:18 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer.php Wed Oct 12 13:07:08 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.8.2.3 2005/09/19 13:45:18 sebastian Exp $ + * @version CVS: $Id: Renderer.php,v 1.8.2.4 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -55,7 +55,7 @@ * * @param string $rendererName * @param array $codeCoverageInformation - * @throws RuntimeException + * @throws Exception * @access public */ public function factory($rendererName, $codeCoverageInformation) { http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter.php?r1=1.2.2.1&r2=1.2.2.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2.2.1 pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2.2.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2.2.1 Fri Sep 9 03:59:04 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter.php Wed Oct 12 13:07:08 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.2.2.1 2005/09/09 07:59:04 sebastian Exp $ + * @version CVS: $Id: ResultPrinter.php,v 1.2.2.2 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -92,7 +92,7 @@ * * @param string $type * @param resource $out - * @throws RuntimeException + * @throws Exception * @access public * @static */
http://cvs.php.net/diff.php/pear/PHPUnit2/package.xml?r1=1.113.2.17&r2=1.113.2.18&ty=u Index: pear/PHPUnit2/package.xml diff -u pear/PHPUnit2/package.xml:1.113.2.17 pear/PHPUnit2/package.xml:1.113.2.18 --- pear/PHPUnit2/package.xml:1.113.2.17 Wed Oct 12 12:12:17 2005 +++ pear/PHPUnit2/package.xml Wed Oct 12 13:07:05 2005 @@ -13,8 +13,8 @@ </maintainers> <license>PHP License</license> <release> - <version>2.3.0beta6</version> - <state>beta</state> + <version>2.3.0</version> + <state>stable</state> <date>2005-10-12</date> <notes><![CDATA[ + Added PHPUnit2_Framework_Assert::assertNotEquals(). @@ -41,8 +41,6 @@ * PHPUnit2_Extensions_TestDox_NamePrettifier now removes digits from the end of test method names and PHPUnit2_Extensions_TestDox_ResultPrinter treats test methods like testBalanceCannotBecomeNegative() and testBalanceCannotBecomeNegative2() as one and prints "Balance cannot become negative" only once. -* PHPUnit2 now uses the Standard PHP Library (SPL)'s specialized exceptions InvalidArgumentException and RuntimeException instead of the generic Exception exception class. - * Renamed Extensions_CodeCoverage_*, Extensions_Log_*, and Extensions_TestDox_* to Util_CodeCoverage_*, Util_Log_*, and Util_TestDox_* as the Extensions_* namespace is intended for extensions of the framework. * Stacktraces for failed tests now show the failing assertion. @@ -52,8 +50,6 @@ * Implemented RFE #4456. * Moved tests outside of installation directory. - -! PHP 5.1.0 (or greater) is now required. ]]></notes> <filelist> <dir name="/" baseinstalldir="PHPUnit2"> http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/ExceptionTestCase.php?r1=1.15.2.1&r2=1.15.2.2&ty=u Index: pear/PHPUnit2/Extensions/ExceptionTestCase.php diff -u pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15.2.1 pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15.2.2 --- pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.15.2.1 Fri Sep 9 03:58:59 2005 +++ pear/PHPUnit2/Extensions/ExceptionTestCase.php Wed Oct 12 13:07:06 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.15.2.1 2005/09/09 07:58:59 sebastian Exp $ + * @version CVS: $Id: ExceptionTestCase.php,v 1.15.2.2 2005/10/12 17:07:06 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -54,7 +54,7 @@ /** * @param string $exceptionName - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.2.0 */ @@ -62,7 +62,7 @@ if (is_string($exceptionName) && class_exists($exceptionName)) { $this->expectedException = $exceptionName; } else { - throw new InvalidArgumentException; + throw new Exception; } } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/PerformanceTestCase.php?r1=1.15.2.2&r2=1.15.2.3&ty=u Index: pear/PHPUnit2/Extensions/PerformanceTestCase.php diff -u pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15.2.2 pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15.2.3 --- pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.15.2.2 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/PerformanceTestCase.php Wed Oct 12 13:07:06 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.15.2.2 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: PerformanceTestCase.php,v 1.15.2.3 2005/10/12 17:07:06 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -69,7 +69,7 @@ /** * @param integer $maxRunningTime - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 */ @@ -78,7 +78,7 @@ $maxRunningTime >= 0) { $this->maxRunningTime = $maxRunningTime; } else { - throw new InvalidArgumentException; + throw new Exception; } } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/RepeatedTest.php?r1=1.15.2.1&r2=1.15.2.2&ty=u Index: pear/PHPUnit2/Extensions/RepeatedTest.php diff -u pear/PHPUnit2/Extensions/RepeatedTest.php:1.15.2.1 pear/PHPUnit2/Extensions/RepeatedTest.php:1.15.2.2 --- pear/PHPUnit2/Extensions/RepeatedTest.php:1.15.2.1 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/RepeatedTest.php Wed Oct 12 13:07:06 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.15.2.1 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: RepeatedTest.php,v 1.15.2.2 2005/10/12 17:07:06 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -46,7 +46,7 @@ * * @param PHPUnit2_Framework_Test $test * @param integer $timesRepeat - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function __construct(PHPUnit2_Framework_Test $test, $timesRepeat = 1) { @@ -56,7 +56,7 @@ $timesRepeat >= 0) { $this->timesRepeat = $timesRepeat; } else { - throw new InvalidArgumentException( + throw new Exception( 'Argument 2 must be a positive integer.' ); } @@ -79,7 +79,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -89,7 +89,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestDecorator.php?r1=1.14.2.1&r2=1.14.2.2&ty=u Index: pear/PHPUnit2/Extensions/TestDecorator.php diff -u pear/PHPUnit2/Extensions/TestDecorator.php:1.14.2.1 pear/PHPUnit2/Extensions/TestDecorator.php:1.14.2.2 --- pear/PHPUnit2/Extensions/TestDecorator.php:1.14.2.1 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/TestDecorator.php Wed Oct 12 13:07:07 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.14.2.1 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: TestDecorator.php,v 1.14.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -117,7 +117,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -127,7 +127,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestSetup.php?r1=1.13.2.3&r2=1.13.2.4&ty=u Index: pear/PHPUnit2/Extensions/TestSetup.php diff -u pear/PHPUnit2/Extensions/TestSetup.php:1.13.2.3 pear/PHPUnit2/Extensions/TestSetup.php:1.13.2.4 --- pear/PHPUnit2/Extensions/TestSetup.php:1.13.2.3 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Extensions/TestSetup.php Wed Oct 12 13:07:07 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.13.2.3 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: TestSetup.php,v 1.13.2.4 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -44,7 +44,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -54,7 +54,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Assert.php?r1=1.45.2.1&r2=1.45.2.2&ty=u Index: pear/PHPUnit2/Framework/Assert.php diff -u pear/PHPUnit2/Framework/Assert.php:1.45.2.1 pear/PHPUnit2/Framework/Assert.php:1.45.2.2 --- pear/PHPUnit2/Framework/Assert.php:1.45.2.1 Fri Sep 9 03:59:00 2005 +++ pear/PHPUnit2/Framework/Assert.php Wed Oct 12 13:07:07 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.45.2.1 2005/09/09 07:59:00 sebastian Exp $ + * @version CVS: $Id: Assert.php,v 1.45.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -85,7 +85,7 @@ * @param mixed $haystack * @param boolean $condition * @param string $message - * @throws InvalidArgumentException + * @throws Exception * @access private * @static * @since Method available since Release 2.2.0 @@ -110,7 +110,7 @@ } else { - throw new InvalidArgumentException; + throw new Exception; } if ($condition && !$found) { @@ -226,7 +226,7 @@ * * @param boolean $condition * @param string $message - * @throws InvalidArgumentException + * @throws Exception * @access public * @static */ @@ -236,7 +236,7 @@ self::fail($message); } } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -245,7 +245,7 @@ * * @param boolean $condition * @param string $message - * @throws InvalidArgumentException + * @throws Exception * @access public * @static */ @@ -253,7 +253,7 @@ if (is_bool($condition)) { self::assertTrue(!$condition, $message); } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -357,7 +357,7 @@ */ private static function doAssertType($expected, $actual, $condition, $message) { if (!is_string($expected)) { - throw new InvalidArgumentException; + throw new Exception; } if (is_object($actual)) { @@ -421,7 +421,7 @@ */ private static function doAssertRegExp($pattern, $string, $condition, $message) { if (!is_string($pattern) || !is_string($string)) { - throw new InvalidArgumentException; + throw new Exception; } $result = preg_match($pattern, $string); http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestCase.php?r1=1.32.2.2&r2=1.32.2.3&ty=u Index: pear/PHPUnit2/Framework/TestCase.php diff -u pear/PHPUnit2/Framework/TestCase.php:1.32.2.2 pear/PHPUnit2/Framework/TestCase.php:1.32.2.3 --- pear/PHPUnit2/Framework/TestCase.php:1.32.2.2 Fri Sep 9 03:59:01 2005 +++ pear/PHPUnit2/Framework/TestCase.php Wed Oct 12 13:07:07 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.32.2.2 2005/09/09 07:59:01 sebastian Exp $ + * @version CVS: $Id: TestCase.php,v 1.32.2.3 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -146,7 +146,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -156,7 +156,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestResult.php?r1=1.32.2.1&r2=1.32.2.2&ty=u Index: pear/PHPUnit2/Framework/TestResult.php diff -u pear/PHPUnit2/Framework/TestResult.php:1.32.2.1 pear/PHPUnit2/Framework/TestResult.php:1.32.2.2 --- pear/PHPUnit2/Framework/TestResult.php:1.32.2.1 Fri Sep 9 03:59:01 2005 +++ pear/PHPUnit2/Framework/TestResult.php Wed Oct 12 13:07:07 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.32.2.1 2005/09/09 07:59:01 sebastian Exp $ + * @version CVS: $Id: TestResult.php,v 1.32.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -287,7 +287,7 @@ * Enables or disables the collection of Code Coverage information. * * @param boolean $flag - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 */ @@ -295,7 +295,7 @@ if (is_bool($flag)) { $this->collectCodeCoverageInformation = $flag; } else { - throw new InvalidArgumentException; + throw new Exception; } } http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestSuite.php?r1=1.26.2.7&r2=1.26.2.8&ty=u Index: pear/PHPUnit2/Framework/TestSuite.php diff -u pear/PHPUnit2/Framework/TestSuite.php:1.26.2.7 pear/PHPUnit2/Framework/TestSuite.php:1.26.2.8 --- pear/PHPUnit2/Framework/TestSuite.php:1.26.2.7 Tue Sep 27 08:17:00 2005 +++ pear/PHPUnit2/Framework/TestSuite.php Wed Oct 12 13:07:07 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.26.2.7 2005/09/27 12:17:00 sebastian Exp $ + * @version CVS: $Id: TestSuite.php,v 1.26.2.8 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -100,7 +100,7 @@ * * @param mixed $theClass * @param string $name - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function __construct($theClass = '', $name = '') { @@ -127,7 +127,7 @@ } if (!$argumentsValid) { - throw new InvalidArgumentException; + throw new Exception; } if ($name != '') { @@ -220,14 +220,14 @@ * leaving the current test run untouched. * * @param string $filename - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 * @author Stefano F. Rausch <stefano@rausch-e.net> */ public function addTestFile($filename) { if (!is_string($filename) || !file_exists($filename)) { - throw new InvalidArgumentException; + throw new Exception; } $declaredClasses = get_declared_classes(); @@ -267,11 +267,11 @@ * Wrapper for addTestFile() that adds multiple test files. * * @param Array $filenames - * @throws InvalidArgumentException + * @throws Exception * @access public * @since Method available since Release 2.3.0 */ - public function addTestFiles(Array $filenames) { + public function addTestFiles($filenames) { foreach ($filenames as $filename) { $this->addTestFile($filename); } @@ -366,7 +366,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function run($result = NULL) { @@ -376,7 +376,7 @@ // XXX: Workaround for missing ability to declare type-hinted parameters as optional. else if (!($result instanceof PHPUnit2_Framework_TestResult)) { - throw new InvalidArgumentException( + throw new Exception( 'Argument 1 must be an instance of PHPUnit2_Framework_TestResult.' ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/IncludePathTestCollector.php?r1=1.13.2.2&r2=1.13.2.3&ty=u Index: pear/PHPUnit2/Runner/IncludePathTestCollector.php diff -u pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13.2.2 pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13.2.3 --- pear/PHPUnit2/Runner/IncludePathTestCollector.php:1.13.2.2 Fri Sep 9 03:59:02 2005 +++ pear/PHPUnit2/Runner/IncludePathTestCollector.php Wed Oct 12 13:07:07 2005 @@ -15,11 +15,68 @@ * @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.13.2.2 2005/09/09 07:59:02 sebastian Exp $ + * @version CVS: $Id: IncludePathTestCollector.php,v 1.13.2.3 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ +if (!class_exists('AppendIterator')) { + class AppendIterator implements Iterator { + private $iterators; + + public function __construct() { + $this->iterators = new ArrayIterator(); + } + + public function __call($func, $params) { + return call_user_func_array(array($this->getInnerIterator(), $func), $params); + } + + public function append(Iterator $it) { + $this->iterators->append($it); + } + + public function getInnerIterator() { + return $this->iterators->current(); + } + + public function rewind() { + $this->iterators->rewind(); + + if ($this->iterators->valid()) { + $this->getInnerIterator()->rewind(); + } + } + + public function valid() { + return $this->iterators->valid() && $this->getInnerIterator()->valid(); + } + + public function current() { + return $this->iterators->valid() ? $this->getInnerIterator()->current() : NULL; + } + + public function key() { + return $this->iterators->valid() ? $this->getInnerIterator()->key() : NULL; + } + + public function next() { + if (!$this->iterators->valid()) return; + $this->getInnerIterator()->next(); + + if ($this->getInnerIterator()->valid()) return; + $this->iterators->next(); + + while ($this->iterators->valid()) { + $this->getInnerIterator()->rewind(); + + if ($this->getInnerIterator()->valid()) return; + $this->iterators->next(); + } + } + } +} + require_once 'PHPUnit2/Runner/TestCollector.php'; require_once 'PEAR/Config.php'; http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/StandardTestSuiteLoader.php?r1=1.19.2.5&r2=1.19.2.6&ty=u Index: pear/PHPUnit2/Runner/StandardTestSuiteLoader.php diff -u pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19.2.5 pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19.2.6 --- pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.19.2.5 Fri Sep 9 03:59:03 2005 +++ pear/PHPUnit2/Runner/StandardTestSuiteLoader.php Wed Oct 12 13:07:07 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.19.2.5 2005/09/09 07:59:03 sebastian Exp $ + * @version CVS: $Id: StandardTestSuiteLoader.php,v 1.19.2.6 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -42,7 +42,7 @@ * @param string $suiteClassName * @param string $suiteClassFile * @return ReflectionClass - * @throws RuntimeException + * @throws Exception * @access public */ public function load($suiteClassName, $suiteClassFile = '') { @@ -72,7 +72,7 @@ if (class_exists($suiteClassName)) { return new ReflectionClass($suiteClassName); } else { - throw new RuntimeException( + throw new Exception( sprintf( 'Class %s could not be found in %s.', http://cvs.php.net/diff.php/pear/PHPUnit2/Samples/BankAccount/BankAccount.php?r1=1.5.2.1&r2=1.5.2.2&ty=u Index: pear/PHPUnit2/Samples/BankAccount/BankAccount.php diff -u pear/PHPUnit2/Samples/BankAccount/BankAccount.php:1.5.2.1 pear/PHPUnit2/Samples/BankAccount/BankAccount.php:1.5.2.2 --- pear/PHPUnit2/Samples/BankAccount/BankAccount.php:1.5.2.1 Sun Jul 3 12:27:32 2005 +++ pear/PHPUnit2/Samples/BankAccount/BankAccount.php Wed Oct 12 13:07:07 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: BankAccount.php,v 1.5.2.1 2005/07/03 16:27:32 sebastian Exp $ + * @version CVS: $Id: BankAccount.php,v 1.5.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -55,14 +55,14 @@ * Sets the bank account's balance. * * @param float $balance - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function setBalance($balance) { if ($balance >= 0) { $this->balance = $balance; } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -70,14 +70,14 @@ * Deposits an amount of money to the bank account. * * @param float $balance - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function depositMoney($amount) { if ($amount >= 0) { $this->balance += $amount; } else { - throw new InvalidArgumentException; + throw new Exception; } } @@ -85,14 +85,14 @@ * Withdraws an amount of money from the bank account. * * @param float $balance - * @throws InvalidArgumentException + * @throws Exception * @access public */ public function withdrawMoney($amount) { if ($amount >= 0 && $this->balance >= $amount) { $this->balance -= $amount; } else { - throw new InvalidArgumentException; + throw new Exception; } } } http://cvs.php.net/diff.php/pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php?r1=1.4.2.1&r2=1.4.2.2&ty=u Index: pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php diff -u pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php:1.4.2.1 pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php:1.4.2.2 --- pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php:1.4.2.1 Sun Jul 3 12:27:32 2005 +++ pear/PHPUnit2/Samples/BankAccount/BankAccountTest.php Wed Oct 12 13:07:07 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: BankAccountTest.php,v 1.4.2.1 2005/07/03 16:27:32 sebastian Exp $ + * @version CVS: $Id: BankAccountTest.php,v 1.4.2.2 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -72,7 +72,7 @@ $this->ba->withdrawMoney(1); } - catch (InvalidArgumentException $e) { + catch (Exception $e) { return; } @@ -89,7 +89,7 @@ $this->ba->depositMoney(-1); } - catch (InvalidArgumentException $e) { + catch (Exception $e) { return; } @@ -106,7 +106,7 @@ $this->ba->setBalance(-1); } - catch (InvalidArgumentException $e) { + catch (Exception $e) { return; } http://cvs.php.net/diff.php/pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php?r1=1.12&r2=1.12.2.1&ty=u Index: pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php diff -u pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php:1.12 pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php:1.12.2.1 --- pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php:1.12 Thu May 5 11:47:15 2005 +++ pear/PHPUnit2/Tests/Extensions/ExceptionTestCaseTest.php Wed Oct 12 13:07:07 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: ExceptionTestCaseTest.php,v 1.12 2005/05/05 15:47:15 sebastian Exp $ + * @version CVS: $Id: ExceptionTestCaseTest.php,v 1.12.2.1 2005/10/12 17:07:07 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -60,7 +60,7 @@ public function testWrongException() { $test = new ThrowExceptionTestCase('test'); - $test->setExpectedException('RuntimeException'); + $test->setExpectedException('ReflectionException'); $result = $test->run(); http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/TestRunner.php?r1=1.64.2.2&r2=1.64.2.3&ty=u Index: pear/PHPUnit2/TextUI/TestRunner.php diff -u pear/PHPUnit2/TextUI/TestRunner.php:1.64.2.2 pear/PHPUnit2/TextUI/TestRunner.php:1.64.2.3 --- pear/PHPUnit2/TextUI/TestRunner.php:1.64.2.2 Fri Sep 9 03:59:03 2005 +++ pear/PHPUnit2/TextUI/TestRunner.php Wed Oct 12 13:07:08 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.64.2.2 2005/09/09 07:59:03 sebastian Exp $ + * @version CVS: $Id: TestRunner.php,v 1.64.2.3 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -96,7 +96,7 @@ /** * @param array $arguments - * @throws RuntimeException + * @throws Exception * @access protected */ protected function start($arguments) { @@ -271,7 +271,7 @@ } catch (Exception $e) { - throw new RuntimeException( + throw new Exception( 'Could not create and run test suite: ' . $e->getMessage() ); } http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Fileloader.php?r1=1.1.2.2&r2=1.1.2.3&ty=u Index: pear/PHPUnit2/Util/Fileloader.php diff -u pear/PHPUnit2/Util/Fileloader.php:1.1.2.2 pear/PHPUnit2/Util/Fileloader.php:1.1.2.3 --- pear/PHPUnit2/Util/Fileloader.php:1.1.2.2 Tue Jun 21 05:02:06 2005 +++ pear/PHPUnit2/Util/Fileloader.php Wed Oct 12 13:07:08 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: Fileloader.php,v 1.1.2.2 2005/06/21 09:02:06 sebastian Exp $ + * @version CVS: $Id: Fileloader.php,v 1.1.2.3 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -38,7 +38,7 @@ * If that is the case, the sourcefile is loaded through include_once(). * * @param string $filename - * @throws RuntimeException + * @throws Exception * @access public * @static */ @@ -48,7 +48,7 @@ } if (!is_readable($filename)) { - throw new RuntimeException( + throw new Exception( sprintf( '%s could not be found or is not readable.', @@ -60,7 +60,7 @@ $output = shell_exec('php -l ' . $filename); if (strpos($output, 'No syntax errors detected in') === FALSE) { - throw new RuntimeException( + throw new Exception( sprintf( 'Syntax error in %s.', http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Skeleton.php?r1=1.24&r2=1.24.2.1&ty=u Index: pear/PHPUnit2/Util/Skeleton.php diff -u pear/PHPUnit2/Util/Skeleton.php:1.24 pear/PHPUnit2/Util/Skeleton.php:1.24.2.1 --- pear/PHPUnit2/Util/Skeleton.php:1.24 Fri Jun 3 01:47:01 2005 +++ pear/PHPUnit2/Util/Skeleton.php Wed Oct 12 13:07:08 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.24 2005/06/03 05:47:01 sebastian Exp $ + * @version CVS: $Id: Skeleton.php,v 1.24.2.1 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -140,7 +140,7 @@ * * @param string $className * @param string $classSourceFile - * @throws RuntimeException + * @throws Exception * @access public */ public function __construct($className, $classSourceFile = '') { @@ -151,7 +151,7 @@ if (file_exists($classSourceFile)) { $this->classSourceFile = $classSourceFile; } else { - throw new RuntimeException( + throw new Exception( sprintf( 'Could not open %s.', @@ -165,7 +165,7 @@ if (class_exists($className)) { $this->className = $className; } else { - throw new RuntimeException( + throw new Exception( sprintf( 'Could not find class "%s" in %s.', http://cvs.php.net/diff.php/pear/PHPUnit2/Util/CodeCoverage/Renderer.php?r1=1.8.2.3&r2=1.8.2.4&ty=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8.2.3 pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8.2.4 --- pear/PHPUnit2/Util/CodeCoverage/Renderer.php:1.8.2.3 Mon Sep 19 09:45:18 2005 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer.php Wed Oct 12 13:07:08 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.8.2.3 2005/09/19 13:45:18 sebastian Exp $ + * @version CVS: $Id: Renderer.php,v 1.8.2.4 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -55,7 +55,7 @@ * * @param string $rendererName * @param array $codeCoverageInformation - * @throws RuntimeException + * @throws Exception * @access public */ public function factory($rendererName, $codeCoverageInformation) { http://cvs.php.net/diff.php/pear/PHPUnit2/Util/TestDox/ResultPrinter.php?r1=1.2.2.1&r2=1.2.2.2&ty=u Index: pear/PHPUnit2/Util/TestDox/ResultPrinter.php diff -u pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2.2.1 pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2.2.2 --- pear/PHPUnit2/Util/TestDox/ResultPrinter.php:1.2.2.1 Fri Sep 9 03:59:04 2005 +++ pear/PHPUnit2/Util/TestDox/ResultPrinter.php Wed Oct 12 13:07:08 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.2.2.1 2005/09/09 07:59:04 sebastian Exp $ + * @version CVS: $Id: ResultPrinter.php,v 1.2.2.2 2005/10/12 17:07:08 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -92,7 +92,7 @@ * * @param string $type * @param resource $out - * @throws RuntimeException + * @throws Exception * @access public * @static */