Skip to content

Commit b93a224

Browse files
danielpalmesebastianbergmann
authored andcommitted
Fixed tests
1 parent 5d3ea5e commit b93a224

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/Report/Clover.php

+1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public function process(CodeCoverage $coverage, ?string $target = null, ?string
165165

166166
if (isset($data['name'])) {
167167
$xmlLine->setAttribute('name', $data['name']);
168+
$xmlLine->setAttribute('signature', $data['name']);
168169
}
169170

170171
if (isset($data['visibility'])) {

tests/_files/class-with-anonymous-function-clover.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<coverage generated="%i">
33
<project timestamp="%i">
4-
<file name="%s%esource_with_class_and_anonymous_function.php">
4+
<file path="%s%esource_with_class_and_anonymous_function.php" name="source_with_class_and_anonymous_function.php">
55
<class name="CoveredClassWithAnonymousFunctionInStaticMethod" namespace="global">
66
<metrics complexity="1" methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="8" coveredstatements="7" elements="9" coveredelements="7"/>
77
</class>
8-
<line num="5" type="method" name="runAnonymous" visibility="public" complexity="1" crap="1.00" count="1"/>
8+
<line num="5" type="method" name="runAnonymous" signature="runAnonymous" visibility="public" complexity="1" crap="1.00" count="1"/>
99
<line num="7" type="stmt" count="1"/>
1010
<line num="9" type="stmt" count="1"/>
1111
<line num="10" type="stmt" count="0"/>

tests/_files/ignored-lines-clover.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<coverage generated="%i">
33
<project timestamp="%i">
4-
<file name="%s%esource_with_ignore.php">
4+
<file path="%s%esource_with_ignore.php" name="source_with_ignore.php">
55
<class name="Foo" namespace="global">
66
<metrics complexity="1" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
77
</class>

0 commit comments

Comments
 (0)