Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPUnit not providing enough information on skipped and incomplete tests

I'm trying to capture the output of PHPUnit:

$pu_result = new \PHPUnit_Framework_TestResult();
$pu_result->addListener(new \PHPUnit_Util_Log_JSON());      

$pu_suite = new \PHPUnit_Framework_TestSuite();

// here I add tests  
// $pu_suite->addTestSuite(...);

ob_start();
$pu_suite->run($pu_result);    
$output = ob_get_clean();

this gives me a json encoded string as $output (bad json btw, but I can fix it).

The problem is that the "message" property for incomplete and skipped tests is "Skipped test" or "Incomplete Test" and doesn't contain the message I provided in the $this->markTestIncomplete() or $this->markTestSkipped() calls :(

Can I get that too?

like image 609
ellabeauty Avatar asked Dec 26 '22 19:12

ellabeauty


1 Answers

Try to run phpunit with -v option (--verbose)

like image 72
Victor Avatar answered Jan 14 '23 00:01

Victor