* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version CVS: $Id: Test.php 313023 2011-07-06 19:17:11Z dufuz $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php New BSD License
- * @version Release: 1.9.4
+ * @version Release: 1.10.1
* @link http://pear.php.net/package/PEAR
* @since Class available since Release 0.1
*/
'shortopt' => 'x',
'doc' => 'Generate a code coverage report (requires Xdebug 2.0.0+)',
),
+ 'showdiff' => array(
+ 'shortopt' => 'd',
+ 'doc' => 'Output diff on test failure',
+ ),
),
'doc' => '[testfile|dir ...]
Run regression tests with PHP\'s regression testing script (run-tests.php).',
*
* @access public
*/
- function PEAR_Command_Test(&$ui, &$config)
+ function __construct(&$ui, &$config)
{
- parent::PEAR_Command_Common($ui, $config);
+ parent::__construct($ui, $config);
}
function doRunTests($command, $options, $params)
}
}
- return true;
+ if (count($failed) == 0) {
+ return true;
+ }
+ return $this->raiseError('Some tests failed');
}
-}
\ No newline at end of file
+}