This repository was archived by the owner on Mar 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : php
22
33env :
4- CODECEPTION_VERSION : ' dev-phpunit-xml-reports'
4+ CODECEPTION_VERSION : ' dev-phpunit-xml-reports-2 '
55
66php :
77 - 5.6
Original file line number Diff line number Diff line change @@ -43,6 +43,15 @@ public function startTest(\PHPUnit\Framework\Test $test)
4343
4444 $ this ->currentFile = $ filename ;
4545 $ this ->currentFileSuite = $ this ->document ->createElement ('testsuite ' );
46+
47+ if ($ test instanceof Reported) {
48+ $ reportFields = $ test ->getReportFields ();
49+ $ class = isset ($ reportFields ['class ' ]) ? $ reportFields ['class ' ] : $ reportFields ['name ' ];
50+ $ this ->currentFileSuite ->setAttribute ('name ' , $ class );
51+ } else {
52+ $ this ->currentFileSuite ->setAttribute ('name ' , get_class ($ test ));
53+ }
54+
4655 $ this ->currentFileSuite ->setAttribute ('file ' , $ filename );
4756
4857 $ this ->testSuites [self ::SUITE_LEVEL ]->appendChild ($ this ->currentFileSuite );
You can’t perform that action at this time.
0 commit comments