class SilverStripeListener implements PHPUnit_Framework_TestListener (View source)

Inject SilverStripe 'setUpOnce' and 'tearDownOnce' unittest extension methods into PHPUnit.

This is already in later SilverStripe 2.4 versions, but having it here extends compatibility to older versions.

Methods

startTestSuite(PHPUnit_Framework_TestSuite $suite)

No description

endTestSuite(PHPUnit_Framework_TestSuite $suite)

No description

startTest(PHPUnit_Framework_Test $test)

No description

endTest(PHPUnit_Framework_Test $test, $time)

No description

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

No description

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

No description

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

No description

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

No description

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

Risky test.

Details

startTestSuite(PHPUnit_Framework_TestSuite $suite)

Parameters

PHPUnit_Framework_TestSuite $suite

endTestSuite(PHPUnit_Framework_TestSuite $suite)

Parameters

PHPUnit_Framework_TestSuite $suite

startTest(PHPUnit_Framework_Test $test)

Parameters

PHPUnit_Framework_Test $test

endTest(PHPUnit_Framework_Test $test, $time)

Parameters

PHPUnit_Framework_Test $test
$time

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

Parameters

PHPUnit_Framework_Test $test
Exception $e
$time

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

Parameters

PHPUnit_Framework_Test $test
PHPUnit_Framework_AssertionFailedError $e
$time

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

Parameters

PHPUnit_Framework_Test $test
Exception $e
$time

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

Parameters

PHPUnit_Framework_Test $test
Exception $e
$time

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

Risky test.

Parameters

PHPUnit_Framework_Test $test
Exception $e
float $time