Skip to content

Commit d7576f8

Browse files
committed
Coverage-xml cannot contain pcov and xdebug at the same time
attribute name needs to be unique
1 parent 9654885 commit d7576f8

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Report/Xml/BuildInformation.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,12 @@ public function __construct(
3838
$xmlWriter->endElement();
3939

4040
$xmlWriter->startElement('driver');
41-
42-
if ($runtime->hasXdebug()) {
43-
$xmlWriter->writeAttribute('name', 'xdebug');
44-
$xmlWriter->writeAttribute('version', phpversion('xdebug'));
45-
}
46-
4741
if ($runtime->hasPCOV()) {
4842
$xmlWriter->writeAttribute('name', 'pcov');
4943
$xmlWriter->writeAttribute('version', phpversion('pcov'));
44+
} elseif ($runtime->hasXdebug()) {
45+
$xmlWriter->writeAttribute('name', 'xdebug');
46+
$xmlWriter->writeAttribute('version', phpversion('xdebug'));
5047
}
5148
$xmlWriter->endElement();
5249

0 commit comments

Comments
 (0)