Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

49 lines (37 sloc) 1.538 kB
* Necessary to call setUpOnce() and tearDownOnce() on {@link SapphireTest}
* classes. This feature doesn't exist in PHPUnit in the same way
* (setUpBeforeClass() and tearDownAfterClass() are just called statically).
* @see
* @package framework
* @subpackage testing
class SS_TestListener implements PHPUnit_Framework_TestListener {
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {}
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {}
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {}
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {}
public function startTest(PHPUnit_Framework_Test $test) {}
public function endTest(PHPUnit_Framework_Test $test, $time) {}
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
$name = $suite->getName();
if(!$this->isValidClass($name)) return;
$this->class = new $name();
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
$name = $suite->getName();
if(!$this->isValidClass($name)) return;
* @param String Classname
* @return boolean
protected function isValidClass($name) {
return (class_exists($name) && is_subclass_of($name, 'SapphireTest'));
Jump to Line
Something went wrong with that request. Please try again.