File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
PHP/CodeCoverage/Report/XML Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,15 @@ class PHP_CodeCoverage_Report_XML_Tests
5656{
5757 private $ contextNode ;
5858
59+ private $ codeMap = array (
60+ PHPUnit_Runner_BaseTestRunner::STATUS_PASSED => 'PASSED ' ,
61+ PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED => 'SKIPPED ' ,
62+ PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE => 'INCOMPLETE ' ,
63+ PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE => 'FAILURE ' ,
64+ PHPUnit_Runner_BaseTestRunner::STATUS_ERROR => 'ERROR ' ,
65+ PHPUnit_Runner_BaseTestRunner::STATUS_RISKY => 'RISKY '
66+ );
67+
5968 public function __construct (DOMElement $ context )
6069 {
6170 $ this ->contextNode = $ context ;
@@ -68,8 +77,9 @@ public function addTest($test, $result)
6877 'http://schema.phpunit.de/coverage/1.0 ' , 'test '
6978 )
7079 );
71-
7280 $ node ->setAttribute ('name ' , $ test );
73- $ node ->setAttribute ('result ' , $ result );
81+ $ node ->setAttribute ('result ' , (int )$ result );
82+ $ node ->setAttribute ('status ' , $ this ->codeMap [(int )$ result ]);
83+
7484 }
7585}
You can’t perform that action at this time.
0 commit comments