Skip to content

Commit 9d50899

Browse files
committed
Only report actual uncovered methods.
1 parent 420c77f commit 9d50899

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/Functional/Command/InspectCommand/Data/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
<error line="1" column="0" severity="error" message="A custom file coverage is configured at 75%, but the current file coverage 90% exceeds the project coverage 80%. Remove `/home/workspace/test/case/unnecessary-custom-rule.php` from phpfci.xml custom-coverage rules." source="phpunit-file-coverage-inspection"/>
1414
</file>
1515
<file name="/home/workspace/test/case/uncovered-method.php">
16-
<error line="16" column="0" severity="error" message="File coverage is above 80%, but method(s) `__construct, myMethod` has/have no coverage at all." source="phpunit-file-coverage-inspection"/>
16+
<error line="16" column="0" severity="error" message="File coverage is above 80%, but method(s) `__construct` has/have no coverage at all." source="phpunit-file-coverage-inspection"/>
1717
</file>
1818
</checkstyle>

tests/Unit/Renderer/CheckStyleRendererTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testRenderFileCoverageTooLow(): void
7070
public function testRenderMissingMethodCoverage(): void
7171
{
7272
$config = new InspectionConfig('', 80);
73-
$metric = new FileMetric('/foo/bar/file.php', 85.3, [new MethodMetric('method', 200, 80)]);
73+
$metric = new FileMetric('/foo/bar/file.php', 85.3, [new MethodMetric('method', 200, 0)]);
7474
$failure = new Failure($metric, 60, Failure::MISSING_METHOD_COVERAGE, 20);
7575

7676
$checkStyle = new CheckStyleRenderer();

0 commit comments

Comments
 (0)