Skip to content

Commit 178ebaf

Browse files
Better testing
1 parent f6ac3a8 commit 178ebaf

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

tests/Subscriber/Application/ApplicationFinishedSubscriberTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public function testNotifyWhenNoTrackedLines(): void
289289
->method('exit');
290290

291291
$subscriber = new ApplicationFinishedSubscriber(
292-
relativePathToCloverXml: 'tests/clover.xml',
292+
relativePathToCloverXml: 'tests/clover-with-no-tracked-lines.xml',
293293
minCoverageRules: MinCoverageRules::fromConfigFile('tests/Subscriber/Application/min-coverage-rules-no-tracked-lines.php'),
294294
cleanUpCloverXml: false,
295295
exitter: $this->exitter,

tests/Subscriber/Application/__snapshots__/ApplicationFinishedSubscriberTest__testNotifyWhenNoTrackedLines__1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
|<bold> Pattern </bold>|<bold> Expected </bold>|<bold> Actual </bold>|<bold> </bold>|<bold> Exit on<fg=default;bg=default></> </bold>|
44
|<bold> </bold>|<bold> </bold>|<bold> </bold>|<bold> </bold>|<bold> fail? </bold>|
55
+-----------------------+------------+----------+-----------------------+-------------+
6-
|<fg=default;bg=default> *NonExistingPattern </>| 20% | <warning>0%</warning> |<fg=default;bg=default> No lines to track...? </>| Yes |
6+
|<fg=default;bg=default> *CommandHandler </>| 20% | <warning>0%</warning> |<fg=default;bg=default> No lines to track...? </>| Yes |
77
+-----------------------+------------+----------+-----------------------+-------------+
88
|<warning> There was at least one pattern that did not match any covered classes. Please consider removing them. </warning>|
99
+-----------------------+------------+----------+-----------------------+-------------+

tests/Subscriber/Application/min-coverage-rules-no-tracked-lines.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
return [
66
new MinCoverageRule(
7-
pattern: '*NonExistingPattern',
7+
pattern: '*CommandHandler',
88
minCoverage: 20,
99
exitOnLowCoverage: true
1010
),
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<coverage generated="1682083729">
3+
<project timestamp="1682083729">
4+
<file name="/var/www/symfony/src/Infrastructure/CQRS/Bus/CanNotRegisterCommandHandler.php">
5+
<class name="App\Infrastructure\CQRS\Bus\CanNotRegisterCommandHandler" namespace="global">
6+
<metrics complexity="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
7+
</class>
8+
<metrics loc="8" ncloc="8" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
9+
</file>
10+
</project>
11+
</coverage>

0 commit comments

Comments
 (0)