Skip to content

Commit

Permalink
Merge pull request #2 from vemaeg/bugfix/attribute-line-is-not-allowe…
Browse files Browse the repository at this point in the history
…d-to-appear-in-element-testsuite

Attribute line is not allowed to appear in element testsuite.
  • Loading branch information
thirsch authored Sep 11, 2021
2 parents a79784f + 9fc35d0 commit 54aa493
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PhpunitMerger/Command/LogCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ private function addTestCases(\DOMElement $parent, array $testCases)

private function addAttributeValueToTestSuite(\DOMElement $element, $key, $value)
{
// attribute line is invalid on testsuite elements.
if ($key === 'line') {
return;
}

$currentValue = $element->hasAttribute($key) ? $element->getAttribute($key) : 0;
$element->setAttribute($key, (string)($currentValue + $value));

Expand Down

0 comments on commit 54aa493

Please sign in to comment.