cvs: pear(ZEND_ENGINE_2) /PHPUnit/TextUI TestRunner.php

From: Date: Sat, 07 Jun 2003 14:06:57 +0000
Subject: cvs: pear(ZEND_ENGINE_2) /PHPUnit/TextUI TestRunner.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-10747@lists.php.net to get a copy of this message
sebastian Sat Jun 7 10:06:57 2003 EDT Modified files: (Branch: ZEND_ENGINE_2) /pear/PHPUnit/TextUI TestRunner.php Log: Add PHPUnit_TextUI_TestRunner::run(). PHPDoc fixes. Index: pear/PHPUnit/TextUI/TestRunner.php diff -u pear/PHPUnit/TextUI/TestRunner.php:1.1.2.1 pear/PHPUnit/TextUI/TestRunner.php:1.1.2.2 --- pear/PHPUnit/TextUI/TestRunner.php:1.1.2.1 Sat Jun 7 09:45:30 2003 +++ pear/PHPUnit/TextUI/TestRunner.php Sat Jun 7 10:06:57 2003 @@ -12,7 +12,7 @@ // | license@php.net so we can mail you a copy immediately. | // +------------------------------------------------------------------------+ // -// $Id: TestRunner.php,v 1.1.2.1 2003/06/07 13:45:30 sebastian Exp $ +// $Id: TestRunner.php,v 1.1.2.2 2003/06/07 14:06:57 sebastian Exp $ // require_once 'Benchmark/Timer.php'; @@ -46,8 +46,9 @@ /** * Runs a test suite. * - * @param PHPUnit_Framework_Test $suite - * @param optional boolean $wait + * @param PHPUnit_Framework_Test $suite + * @param optional boolean $wait + * @return PHPUnit_Framework_TestResult * @access public */ public function doRun(PHPUnit_Framework_Test $suite, $wait = false) { @@ -257,6 +258,24 @@ $result->errorCount() ); } + } + + // }}} + // {{{ public function run(PHPUnit_Framework_Test $test) + + /** + * Runs a single test and collects its results. + * This method can be used to start a test run + * from your program. + * + * @param PHPUnit_Framework_Test $test + * @return PHPUnit_Framework_TestResult + * @access public + */ + public static function run(PHPUnit_Framework_Test $test) { + $runner = new PHPUnit_TextUI_TestRunner; + + return $runner->doRun($test); } // }}}

« previous php.pear.cvs (#10747) next »