From 9fc35d04ed80a7406a6f30ba3e6d367f9cab7337 Mon Sep 17 00:00:00 2001 From: "Thomas A. Hirsch" Date: Sat, 11 Sep 2021 19:44:40 +0200 Subject: [PATCH] Attribute line is not allowed to appear in element testsuite. --- src/PhpunitMerger/Command/LogCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PhpunitMerger/Command/LogCommand.php b/src/PhpunitMerger/Command/LogCommand.php index 5024607..ce2f2da 100644 --- a/src/PhpunitMerger/Command/LogCommand.php +++ b/src/PhpunitMerger/Command/LogCommand.php @@ -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));