protected function runTest()
{
ob_start();
$this->obActive = TRUE;
try {
$testResult = parent::runTest();
} catch (Exception $e) {
ob_end_clean();
$this->obActive = FALSE;
throw $e;
}
if ($this->outputCallback === FALSE) {
$this->output = ob_get_contents();
} else {
$this->output = call_user_func_array($this->outputCallback, array(ob_get_contents()));
}
ob_end_clean();
$this->obActive = FALSE;
if ($this->expectedRegex !== NULL) {
$this->assertRegExp($this->expectedRegex, $this->output);
$this->expectedRegex = NULL;
} else {
if ($this->expectedString !== NULL) {
$this->assertEquals($this->expectedString, $this->output);
$this->expectedString = NULL;
}
}
return $testResult;
}