cvs: pear /PHPUnit2/Extensions ExceptionTestCase.php PerformanceTestCase.php RepeatedTest.php TestDecorator.php TestSetup.php
/PHPUnit2/Extensions/CodeCoverage Renderer.php /PHPUnit2/Extensions/TestDox ResultPrinter.php /PHPUnit2/Framework Assert.php TestCase.php
TestResult.php TestSuite.php /PHPUnit2/Runner StandardTestSuiteLoader.php /PHPUnit2/TextUI TestRunner.php /PHPUnit2/Util Skeleton.php

From: Date: Sat, 16 Apr 2005 17:16:37 +0000
Subject: cvs: pear /PHPUnit2/Extensions ExceptionTestCase.php PerformanceTestCase.php RepeatedTest.php TestDecorator.php TestSetup.php
/PHPUnit2/Extensions/CodeCoverage Renderer.php /PHPUnit2/Extensions/TestDox ResultPrinter.php /PHPUnit2/Framework Assert.php TestCase.php
TestResult.php TestSuite.php /PHPUnit2/Runner StandardTestSuiteLoader.php /PHPUnit2/TextUI TestRunner.php /PHPUnit2/Util Skeleton.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-31195@lists.php.net to get a copy of this message
sebastian Sat Apr 16 13:16:37 2005 EDT Modified files: /pear/PHPUnit2/Extensions ExceptionTestCase.php PerformanceTestCase.php RepeatedTest.php TestDecorator.php TestSetup.php /pear/PHPUnit2/Extensions/CodeCoverage Renderer.php /pear/PHPUnit2/Extensions/TestDox ResultPrinter.php /pear/PHPUnit2/Framework Assert.php TestCase.php TestResult.php TestSuite.php /pear/PHPUnit2/Runner StandardTestSuiteLoader.php /pear/PHPUnit2/TextUI TestRunner.php /pear/PHPUnit2/Util Skeleton.php Log: Add missing @throws code comments.

http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/ExceptionTestCase.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Extensions/ExceptionTestCase.php diff -u pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.10 pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.11 --- pear/PHPUnit2/Extensions/ExceptionTestCase.php:1.10 Mon Apr 11 01:48:06 2005 +++ pear/PHPUnit2/Extensions/ExceptionTestCase.php Sat Apr 16 13:16: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: ExceptionTestCase.php,v 1.10 2005/04/11 05:48:06 sebastian Exp $ + * @version CVS: $Id: ExceptionTestCase.php,v 1.11 2005/04/16 17:16:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -67,6 +67,7 @@ /** * @param string $exceptionName + * @throws InvalidArgumentException * @access public * @since Method available since Release 2.2.0 */ @@ -74,12 +75,7 @@ if (is_string($exceptionName) && class_exists($exceptionName)) { $this->expectedException = $exceptionName; } else { - throw new Exception( - sprintf( - 'Exception %s does not exist.', - $exceptionName - ) - ); + throw new InvalidArgumentException; } } http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/PerformanceTestCase.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Extensions/PerformanceTestCase.php diff -u pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.10 pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.11 --- pear/PHPUnit2/Extensions/PerformanceTestCase.php:1.10 Wed Apr 13 01:05:16 2005 +++ pear/PHPUnit2/Extensions/PerformanceTestCase.php Sat Apr 16 13:16: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: PerformanceTestCase.php,v 1.10 2005/04/13 05:05:16 sebastian Exp $ + * @version CVS: $Id: PerformanceTestCase.php,v 1.11 2005/04/16 17:16:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -46,6 +46,7 @@ /** * @param string $name * @param double $maxRunningTime + * @throws InvalidArgumentException * @access public */ public function __construct($name, $maxRunningTime = 0) { http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/RepeatedTest.php?r1=1.12&r2=1.13&ty=u Index: pear/PHPUnit2/Extensions/RepeatedTest.php diff -u pear/PHPUnit2/Extensions/RepeatedTest.php:1.12 pear/PHPUnit2/Extensions/RepeatedTest.php:1.13 --- pear/PHPUnit2/Extensions/RepeatedTest.php:1.12 Wed Apr 13 01:05:16 2005 +++ pear/PHPUnit2/Extensions/RepeatedTest.php Sat Apr 16 13:16: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: RepeatedTest.php,v 1.12 2005/04/13 05:05:16 sebastian Exp $ + * @version CVS: $Id: RepeatedTest.php,v 1.13 2005/04/16 17:16:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -48,6 +48,7 @@ * * @param PHPUnit2_Framework_Test $test * @param integer $timesRepeat + * @throws InvalidArgumentException * @access public */ public function __construct(PHPUnit2_Framework_Test $test, $timesRepeat = 1) { @@ -80,6 +81,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException * @access public */ public function run($result = NULL) { http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestDecorator.php?r1=1.11&r2=1.12&ty=u Index: pear/PHPUnit2/Extensions/TestDecorator.php diff -u pear/PHPUnit2/Extensions/TestDecorator.php:1.11 pear/PHPUnit2/Extensions/TestDecorator.php:1.12 --- pear/PHPUnit2/Extensions/TestDecorator.php:1.11 Wed Apr 13 01:05:17 2005 +++ pear/PHPUnit2/Extensions/TestDecorator.php Sat Apr 16 13:16: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: TestDecorator.php,v 1.11 2005/04/13 05:05:17 sebastian Exp $ + * @version CVS: $Id: TestDecorator.php,v 1.12 2005/04/16 17:16:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -117,6 +117,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException * @access public */ public function run($result = NULL) { http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestSetup.php?r1=1.10&r2=1.11&ty=u Index: pear/PHPUnit2/Extensions/TestSetup.php diff -u pear/PHPUnit2/Extensions/TestSetup.php:1.10 pear/PHPUnit2/Extensions/TestSetup.php:1.11 --- pear/PHPUnit2/Extensions/TestSetup.php:1.10 Wed Apr 13 01:05:17 2005 +++ pear/PHPUnit2/Extensions/TestSetup.php Sat Apr 16 13:16: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: TestSetup.php,v 1.10 2005/04/13 05:05:17 sebastian Exp $ + * @version CVS: $Id: TestSetup.php,v 1.11 2005/04/16 17:16:36 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -44,6 +44,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException * @access public */ public function run($result = NULL) { http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/CodeCoverage/Renderer.php?r1=1.15&r2=1.16&ty=u Index: pear/PHPUnit2/Extensions/CodeCoverage/Renderer.php diff -u pear/PHPUnit2/Extensions/CodeCoverage/Renderer.php:1.15 pear/PHPUnit2/Extensions/CodeCoverage/Renderer.php:1.16 --- pear/PHPUnit2/Extensions/CodeCoverage/Renderer.php:1.15 Wed Apr 13 01:05:18 2005 +++ pear/PHPUnit2/Extensions/CodeCoverage/Renderer.php Sat Apr 16 13:16: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.15 2005/04/13 05:05:18 sebastian Exp $ + * @version CVS: $Id: Renderer.php,v 1.16 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -61,6 +61,7 @@ * * @param string $rendererName * @param array $codeCoverageInformation + * @throws RuntimeException * @access public */ public function factory($rendererName, $codeCoverageInformation) { http://cvs.php.net/diff.php/pear/PHPUnit2/Extensions/TestDox/ResultPrinter.php?r1=1.11&r2=1.12&ty=u Index: pear/PHPUnit2/Extensions/TestDox/ResultPrinter.php diff -u pear/PHPUnit2/Extensions/TestDox/ResultPrinter.php:1.11 pear/PHPUnit2/Extensions/TestDox/ResultPrinter.php:1.12 --- pear/PHPUnit2/Extensions/TestDox/ResultPrinter.php:1.11 Wed Apr 13 01:05:18 2005 +++ pear/PHPUnit2/Extensions/TestDox/ResultPrinter.php Sat Apr 16 13:16: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.11 2005/04/13 05:05:18 sebastian Exp $ + * @version CVS: $Id: ResultPrinter.php,v 1.12 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -89,6 +89,7 @@ * * @param string $type * @param resource $out + * @throws RuntimeException * @access public * @static */ http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/Assert.php?r1=1.34&r2=1.35&ty=u Index: pear/PHPUnit2/Framework/Assert.php diff -u pear/PHPUnit2/Framework/Assert.php:1.34 pear/PHPUnit2/Framework/Assert.php:1.35 --- pear/PHPUnit2/Framework/Assert.php:1.34 Wed Apr 13 01:05:18 2005 +++ pear/PHPUnit2/Framework/Assert.php Sat Apr 16 13:16: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: Assert.php,v 1.34 2005/04/13 05:05:18 sebastian Exp $ + * @version CVS: $Id: Assert.php,v 1.35 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -145,6 +145,7 @@ * * @param boolean $condition * @param string $message + * @throws InvalidArgumentException * @access public * @static */ @@ -163,6 +164,7 @@ * * @param boolean $condition * @param string $message + * @throws InvalidArgumentException * @access public * @static */ @@ -209,6 +211,7 @@ * @param object $object * @param object $object * @param string $message + * @throws InvalidArgumentException * @access public * @static */ @@ -229,6 +232,7 @@ * @param object $object * @param object $object * @param string $message + * @throws InvalidArgumentException * @access public * @static */ @@ -364,6 +368,7 @@ * @param mixed $haystack * @param boolean $condition * @param string $message + * @throws InvalidArgumentException * @access private * @static * @since Method available since Release 2.2.0 http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestCase.php?r1=1.26&r2=1.27&ty=u Index: pear/PHPUnit2/Framework/TestCase.php diff -u pear/PHPUnit2/Framework/TestCase.php:1.26 pear/PHPUnit2/Framework/TestCase.php:1.27 --- pear/PHPUnit2/Framework/TestCase.php:1.26 Wed Apr 13 01:05:18 2005 +++ pear/PHPUnit2/Framework/TestCase.php Sat Apr 16 13:16: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: TestCase.php,v 1.26 2005/04/13 05:05:18 sebastian Exp $ + * @version CVS: $Id: TestCase.php,v 1.27 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -172,6 +172,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException * @access public */ public function run($result = NULL) { @@ -220,6 +221,7 @@ /** * Override to run the test and assert its state. * + * @throws PHPUnit2_Framework_Error * @access protected */ protected function runTest() { http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestResult.php?r1=1.21&r2=1.22&ty=u Index: pear/PHPUnit2/Framework/TestResult.php diff -u pear/PHPUnit2/Framework/TestResult.php:1.21 pear/PHPUnit2/Framework/TestResult.php:1.22 --- pear/PHPUnit2/Framework/TestResult.php:1.21 Mon Apr 11 01:48:08 2005 +++ pear/PHPUnit2/Framework/TestResult.php Sat Apr 16 13:16: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: TestResult.php,v 1.21 2005/04/11 05:48:08 sebastian Exp $ + * @version CVS: $Id: TestResult.php,v 1.22 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -391,6 +391,7 @@ * @param string $errstr * @param string $errfile * @param integer $errline + * @throws PHPUnit2_Framework_Error * @access public * @since Method available since Release 2.2.0 */ http://cvs.php.net/diff.php/pear/PHPUnit2/Framework/TestSuite.php?r1=1.20&r2=1.21&ty=u Index: pear/PHPUnit2/Framework/TestSuite.php diff -u pear/PHPUnit2/Framework/TestSuite.php:1.20 pear/PHPUnit2/Framework/TestSuite.php:1.21 --- pear/PHPUnit2/Framework/TestSuite.php:1.20 Wed Apr 13 01:05:18 2005 +++ pear/PHPUnit2/Framework/TestSuite.php Sat Apr 16 13:16: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: TestSuite.php,v 1.20 2005/04/13 05:05:18 sebastian Exp $ + * @version CVS: $Id: TestSuite.php,v 1.21 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -284,6 +284,7 @@ * * @param PHPUnit2_Framework_TestResult $result * @return PHPUnit2_Framework_TestResult + * @throws InvalidArgumentException * @access public */ public function run($result = NULL) { http://cvs.php.net/diff.php/pear/PHPUnit2/Runner/StandardTestSuiteLoader.php?r1=1.14&r2=1.15&ty=u Index: pear/PHPUnit2/Runner/StandardTestSuiteLoader.php diff -u pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.14 pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.15 --- pear/PHPUnit2/Runner/StandardTestSuiteLoader.php:1.14 Wed Apr 13 01:05:18 2005 +++ pear/PHPUnit2/Runner/StandardTestSuiteLoader.php Sat Apr 16 13:16: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: StandardTestSuiteLoader.php,v 1.14 2005/04/13 05:05:18 sebastian Exp $ + * @version CVS: $Id: StandardTestSuiteLoader.php,v 1.15 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -39,6 +39,7 @@ * @param string $suiteClassName * @param string $suiteClassFile * @return ReflectionClass + * @throws RuntimeException * @access public */ public function load($suiteClassName, $suiteClassFile = '') { http://cvs.php.net/diff.php/pear/PHPUnit2/TextUI/TestRunner.php?r1=1.54&r2=1.55&ty=u Index: pear/PHPUnit2/TextUI/TestRunner.php diff -u pear/PHPUnit2/TextUI/TestRunner.php:1.54 pear/PHPUnit2/TextUI/TestRunner.php:1.55 --- pear/PHPUnit2/TextUI/TestRunner.php:1.54 Wed Apr 13 01:05:19 2005 +++ pear/PHPUnit2/TextUI/TestRunner.php Sat Apr 16 13:16: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.54 2005/04/13 05:05:19 sebastian Exp $ + * @version CVS: $Id: TestRunner.php,v 1.55 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.0.0 */ @@ -104,6 +104,7 @@ /** * @param array $arguments + * @throws RuntimeException * @access protected */ protected function start($arguments) { http://cvs.php.net/diff.php/pear/PHPUnit2/Util/Skeleton.php?r1=1.20&r2=1.21&ty=u Index: pear/PHPUnit2/Util/Skeleton.php diff -u pear/PHPUnit2/Util/Skeleton.php:1.20 pear/PHPUnit2/Util/Skeleton.php:1.21 --- pear/PHPUnit2/Util/Skeleton.php:1.20 Mon Apr 11 01:48:10 2005 +++ pear/PHPUnit2/Util/Skeleton.php Sat Apr 16 13:16: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.20 2005/04/11 05:48:10 sebastian Exp $ + * @version CVS: $Id: Skeleton.php,v 1.21 2005/04/16 17:16:37 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.1.0 */ @@ -139,6 +139,7 @@ * * @param string $className * @param string $classSourceFile + * @throws RuntimeException * @access public */ public function __construct($className, $classSourceFile = '') { @@ -149,7 +150,7 @@ if (file_exists($classSourceFile)) { $this->classSourceFile = $classSourceFile; } else { - throw new Exception('Could not open ' . $classSourceFile . '.'); + throw new RuntimeException('Could not open ' . $classSourceFile . '.'); } @include_once $this->classSourceFile; @@ -157,7 +158,7 @@ if (class_exists($className)) { $this->className = $className; } else { - throw new Exception('Could not find class "' . $className . '".'); + throw new RuntimeException('Could not find class "' . $className . '".'); } }
« previous php.pear.cvs (#31195) next »