Skip to content

Commit

Permalink
Merge pull request #1 from vemaeg/bugfix/fixed-add-testsuites-if-name…
Browse files Browse the repository at this point in the history
…-is-empty

Fixed addTestSuites-Call in case the name attribute is empty and ther…
  • Loading branch information
thirsch authored Sep 11, 2021
2 parents edec3fc + a7a43f8 commit a79784f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PhpunitMerger/Command/LogCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ private function addTestSuites(\DOMElement $parent, array $testSuites)
foreach ($testSuites as $testSuite) {
if (empty($testSuite['@attributes']['name'])) {
if (!empty($testSuite['testsuite'])) {
$this->addTestSuites($parent, $testSuite['testsuite']);
$children = isset($testSuite['testsuite']['@attributes']) ? [$testSuite['testsuite']] : $testSuite['testsuite'];
$this->addTestSuites($parent, $children);
}
continue;
}
Expand Down

0 comments on commit a79784f

Please sign in to comment.