sebastianbergmann/phpunit — Issue #377: JSON listener ignores status message
Author: dmitri--
Created: 2011-10-15 12:18:19+00:00
State: open

Info passed with $message to markTestSkipped($message) method is ignored by JSON listener.
To fix this problem
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
{
$this->writeCase('error', $time, array(), 'Skipped Test');

$this->currentTestPass = FALSE;
}

should be replaced with:

public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time)
{
$this->writeCase('error', $time, array(), 'Skipped Test\n' . $e->getMessage());

$this->currentTestPass = FALSE;
}

Same goes to markTestIncomplete()

and perhaps it makes sense to add trace too:

$this->writeCase('error', $time, PHPUnit_Util_Filter::getFilteredStacktrace($e, FALSE), 'Skipped Test\n');