class CliTestReporter extends SapphireTestReporter

Test reporter optimised for CLI (ie, plain-text) output

Methods

void
__construct()

Constructor, checks to see availability of PEAR Benchmark_Timer and sets up basic properties

array
getSuiteResults()

Returns the suite results

void
startTestSuite(PHPUnit_Framework_TestSuite $suite)

Sets up the container for result details of the current test suite when each suite is first run

void
startTest(PHPUnit_Framework_Test $test)

Sets up the container for result details of the current test when each test is first run

void
addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)

Adds the failure detail to the current test and increases the failure count for the current suite

void
addError(PHPUnit_Framework_Test $test, Exception $e, $time)

Adds the error detail to the current test and increases the error count for the current suite

void
addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)

Adds the test incomplete detail to the current test and increases the incomplete count for the current suite

addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)

Not used

void
endTest(PHPUnit_Framework_Test $test, $time)

Upon completion of a test, records the execution time (if available) and adds the test to the tests performed in the current suite.

void
endTestSuite(PHPUnit_Framework_TestSuite $suite)

Upon completion of a test suite adds the suite to the suties performed

addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, float $time)

Risky test.

writeResults()

Display error bar if it exists

Details

in SapphireTestReporter at line 83
void __construct()

Constructor, checks to see availability of PEAR Benchmark_Timer and sets up basic properties

Return Value

void

in SapphireTestReporter at line 105
array getSuiteResults()

Returns the suite results

Return Value

array Suite results

in SapphireTestReporter at line 117
void startTestSuite(PHPUnit_Framework_TestSuite $suite)

Sets up the container for result details of the current test suite when each suite is first run

Parameters

PHPUnit_Framework_TestSuite $suite PHPUnit2_Framework_TestSuite, the suite that is been run

Return Value

void

in SapphireTestReporter at line 138
void startTest(PHPUnit_Framework_Test $test)

Sets up the container for result details of the current test when each test is first run

Parameters

PHPUnit_Framework_Test $test PHPUnit_Framework_Test, the test that is being run

Return Value

void

in SapphireTestReporter at line 197
void addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)

Adds the failure detail to the current test and increases the failure count for the current suite

Parameters

PHPUnit_Framework_Test $test
PHPUnit_Framework_AssertionFailedError $e
$time

Return Value

void

in SapphireTestReporter at line 211
void addError(PHPUnit_Framework_Test $test, Exception $e, $time)

Adds the error detail to the current test and increases the error count for the current suite

Parameters

PHPUnit_Framework_Test $test
Exception $e
$time

Return Value

void

in SapphireTestReporter at line 225
void addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time)

Adds the test incomplete detail to the current test and increases the incomplete count for the current suite

Parameters

PHPUnit_Framework_Test $test
Exception $e
$time

Return Value

void

in SapphireTestReporter at line 236
addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)

Not used

Parameters

PHPUnit_Framework_Test $test
Exception $e
$time

at line 65
void endTest(PHPUnit_Framework_Test $test, $time)

Upon completion of a test, records the execution time (if available) and adds the test to the tests performed in the current suite.

Parameters

PHPUnit_Framework_Test $test
$time

Return Value

void

in SapphireTestReporter at line 297
void endTestSuite(PHPUnit_Framework_TestSuite $suite)

Upon completion of a test suite adds the suite to the suties performed

Parameters

PHPUnit_Framework_TestSuite $suite PHPUnit_Framework_TestSuite, current suite that is being run

Return Value

void

in SapphireTestReporter at line 311
addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, float $time)

Risky test.

Parameters

PHPUnit_Framework_Test $test
Exception $e
float $time

at line 13
writeResults()

Display error bar if it exists