Skip to content

Commit

Permalink
Attribute line is not allowed to appear in element testsuite.
Browse files Browse the repository at this point in the history
  • Loading branch information
thirsch committed Sep 11, 2021
1 parent a79784f commit 9fc35d0
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 9fc35d0

Please sign in to comment.