Source for file default_reporter.php
Documentation is available at default_reporter.php
* Optional include file for SimpleTest
* @version $Id: default_reporter.php 1704 2008-03-25 00:47:04Z lastcraft $
* include other SimpleTest class files
require_once(dirname(__FILE__
) .
'/simpletest.php');
require_once(dirname(__FILE__
) .
'/scorer.php');
require_once(dirname(__FILE__
) .
'/reporter.php');
require_once(dirname(__FILE__
) .
'/xml.php');
* Parser for command line arguments. Extracts
* the a specific test to run and engages XML
* reporting when necessary.
'case' =>
'_case', 'c' =>
'_case',
'test' =>
'_test', 't' =>
'_test',
'xml' =>
'_xml', 'x' =>
'_xml');
* Parses raw command line arguments into object properties.
* @param string $arguments Raw commend line arguments.
foreach ($arguments as $i =>
$argument) {
if (preg_match('/^--?(test|case|t|c)=(.+)$/', $argument, $matches)) {
$this->$property =
$matches[2];
} elseif (preg_match('/^--?(test|case|t|c)$/', $argument, $matches)) {
if (isset
($arguments[$i +
1])) {
$this->$property =
$arguments[$i +
1];
} elseif (preg_match('/^--?(xml|x)$/', $argument)) {
} elseif (preg_match('/^--?(no-skip|no-skips|s)$/', $argument)) {
* @return string Test name to run.
* Run only this test suite.
* @return string Test class name to run.
* Output should be XML or not.
* @return boolean True if XML desired.
* Output should suppress skip messages.
* @return boolean True for no skips.
* The default reporter used by SimpleTest's autorun
* feature. The actual reporters used are dependency
* injected and can be overridden.
* Assembles the appopriate reporter for the environment.
$interfaces =
$parser->isXml() ?
array('XmlReporter') :
array('TextReporter');
if ($parser->noSkips()) {
if (@$_GET['skips'] ==
'no' ||
@$_GET['show-skips'] ==
'no') {
Documentation generated on Sun, 04 May 2008 09:21:25 -0500 by phpDocumentor 1.3.0