@@ -51,7 +51,7 @@ public function testNotifyWithAtLeastOneFailedRule(): void
51
51
->method ('exit ' );
52
52
53
53
$ subscriber = new ApplicationFinishedSubscriber (
54
- relativePathToCloverXml : 'tests/clover.xml ' ,
54
+ pathToCloverXml : 'tests/clover.xml ' ,
55
55
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-with-failed-rule.php ' ),
56
56
cleanUpCloverXml: false ,
57
57
exitter: $ this ->exitter ,
@@ -85,7 +85,7 @@ public function testNotifyWithAWarning(): void
85
85
->method ('exit ' );
86
86
87
87
$ subscriber = new ApplicationFinishedSubscriber (
88
- relativePathToCloverXml : 'tests/clover.xml ' ,
88
+ pathToCloverXml : 'tests/clover.xml ' ,
89
89
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-with-warning.php ' ),
90
90
cleanUpCloverXml: false ,
91
91
exitter: $ this ->exitter ,
@@ -119,7 +119,7 @@ public function testNotifyWhenCoverageIsOk(): void
119
119
->method ('exit ' );
120
120
121
121
$ subscriber = new ApplicationFinishedSubscriber (
122
- relativePathToCloverXml : 'tests/clover.xml ' ,
122
+ pathToCloverXml : 'tests/clover.xml ' ,
123
123
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-success.php ' ),
124
124
cleanUpCloverXml: false ,
125
125
exitter: $ this ->exitter ,
@@ -153,7 +153,7 @@ public function testNotifyWithOnlyTotal(): void
153
153
->method ('exit ' );
154
154
155
155
$ subscriber = new ApplicationFinishedSubscriber (
156
- relativePathToCloverXml : 'tests/clover.xml ' ,
156
+ pathToCloverXml : 'tests/clover.xml ' ,
157
157
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-total-only.php ' ),
158
158
cleanUpCloverXml: false ,
159
159
exitter: $ this ->exitter ,
@@ -187,7 +187,7 @@ public function testNotifyWithoutTotal(): void
187
187
->method ('exit ' );
188
188
189
189
$ subscriber = new ApplicationFinishedSubscriber (
190
- relativePathToCloverXml : 'tests/clover.xml ' ,
190
+ pathToCloverXml : 'tests/clover.xml ' ,
191
191
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-without-total.php ' ),
192
192
cleanUpCloverXml: false ,
193
193
exitter: $ this ->exitter ,
@@ -221,7 +221,7 @@ public function testNotifyWithRulesThatDoNotExit(): void
221
221
->method ('exit ' );
222
222
223
223
$ subscriber = new ApplicationFinishedSubscriber (
224
- relativePathToCloverXml : 'tests/clover.xml ' ,
224
+ pathToCloverXml : 'tests/clover.xml ' ,
225
225
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-no-exit.php ' ),
226
226
cleanUpCloverXml: false ,
227
227
exitter: $ this ->exitter ,
@@ -255,7 +255,7 @@ public function testDivideByZero(): void
255
255
->method ('exit ' );
256
256
257
257
$ subscriber = new ApplicationFinishedSubscriber (
258
- relativePathToCloverXml : 'tests/clover-test-divide-by-zero.xml ' ,
258
+ pathToCloverXml : 'tests/clover-test-divide-by-zero.xml ' ,
259
259
minCoverageRules: MinCoverageRules::fromInt (100 , true ),
260
260
cleanUpCloverXml: false ,
261
261
exitter: $ this ->exitter ,
@@ -289,7 +289,7 @@ public function testNotifyWhenNoTrackedLines(): void
289
289
->method ('exit ' );
290
290
291
291
$ subscriber = new ApplicationFinishedSubscriber (
292
- relativePathToCloverXml : 'tests/clover-with-no-tracked-lines.xml ' ,
292
+ pathToCloverXml : 'tests/clover-with-no-tracked-lines.xml ' ,
293
293
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-no-tracked-lines.php ' ),
294
294
cleanUpCloverXml: false ,
295
295
exitter: $ this ->exitter ,
@@ -323,14 +323,15 @@ public function testNotifyWithNonExistingCloverFile(): void
323
323
->method ('exit ' );
324
324
325
325
$ subscriber = new ApplicationFinishedSubscriber (
326
- relativePathToCloverXml : 'tests/clover-wrong.xml ' ,
326
+ pathToCloverXml : 'tests/clover-wrong.xml ' ,
327
327
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-success.php ' ),
328
328
cleanUpCloverXml: false ,
329
329
exitter: $ this ->exitter ,
330
330
consoleOutput: new ConsoleOutput ($ this ->output , $ this ->resourceUsageFormatter ),
331
331
timer: $ this ->timer ,
332
332
);
333
333
334
+ $ this ->expectExceptionObject (new \RuntimeException ('Clover XML file not found at: /var/www/tests/clover-wrong.xml ' ));
334
335
$ subscriber ->notify (event: new Finished (
335
336
new Info (
336
337
current: new Snapshot (
@@ -346,8 +347,6 @@ public function testNotifyWithNonExistingCloverFile(): void
346
347
),
347
348
0
348
349
));
349
-
350
- $ this ->assertEmpty ((string ) $ this ->output );
351
350
}
352
351
353
352
public function testNotifyWithInvalidCloverFile (): void
@@ -357,7 +356,7 @@ public function testNotifyWithInvalidCloverFile(): void
357
356
->method ('exit ' );
358
357
359
358
$ subscriber = new ApplicationFinishedSubscriber (
360
- relativePathToCloverXml : 'tests/clover-invalid.xml ' ,
359
+ pathToCloverXml : 'tests/clover-invalid.xml ' ,
361
360
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-success.php ' ),
362
361
cleanUpCloverXml: false ,
363
362
exitter: $ this ->exitter ,
@@ -394,7 +393,7 @@ public function testNotifyWithCleanUpCloverFile(): void
394
393
->method ('exit ' );
395
394
396
395
$ subscriber = new ApplicationFinishedSubscriber (
397
- relativePathToCloverXml : 'tests/clover-to-delete.xml ' ,
396
+ pathToCloverXml : 'tests/clover-to-delete.xml ' ,
398
397
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-with-failed-rule.php ' ),
399
398
cleanUpCloverXml: true ,
400
399
exitter: $ this ->exitter ,
@@ -431,7 +430,7 @@ public function testNotifyWithDuplicatePatterns(): void
431
430
$ this ->expectExceptionMessage ('Make sure all coverage rule patterns are unique ' );
432
431
433
432
new ApplicationFinishedSubscriber (
434
- relativePathToCloverXml : 'tests/clover.xml ' ,
433
+ pathToCloverXml : 'tests/clover.xml ' ,
435
434
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-with-duplicates.php ' ),
436
435
cleanUpCloverXml: false ,
437
436
exitter: $ this ->exitter ,
@@ -450,7 +449,7 @@ public function testNotifyWithInvalidRules(): void
450
449
$ this ->expectExceptionMessage ('MinCoverage has to be value between 0 and 100. 203 given ' );
451
450
452
451
new ApplicationFinishedSubscriber (
453
- relativePathToCloverXml : 'tests/clover.xml ' ,
452
+ pathToCloverXml : 'tests/clover.xml ' ,
454
453
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-invalid.php ' ),
455
454
cleanUpCloverXml: false ,
456
455
exitter: $ this ->exitter ,
@@ -469,7 +468,7 @@ public function testNotifyWithInvalidRuleInstances(): void
469
468
$ this ->expectExceptionMessage ('Make sure all coverage rules are of instance RobinIngelbrecht\PHPUnitCoverageTools\MinCoverage\MinCoverageRule ' );
470
469
471
470
new ApplicationFinishedSubscriber (
472
- relativePathToCloverXml : 'tests/clover.xml ' ,
471
+ pathToCloverXml : 'tests/clover.xml ' ,
473
472
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-invalid-rule-instances.php ' ),
474
473
cleanUpCloverXml: false ,
475
474
exitter: $ this ->exitter ,
@@ -482,7 +481,7 @@ public function testFromConfigurationAndParameters(): void
482
481
{
483
482
$ this ->assertEquals (
484
483
new ApplicationFinishedSubscriber (
485
- relativePathToCloverXml : 'tests/clover.xml ' ,
484
+ pathToCloverXml : 'tests/clover.xml ' ,
486
485
minCoverageRules: MinCoverageRules::fromInt (90 , false ),
487
486
cleanUpCloverXml: true ,
488
487
exitter: new Exitter (),
@@ -503,7 +502,7 @@ public function testFromConfigurationAndParameters2(): void
503
502
{
504
503
$ this ->assertEquals (
505
504
new ApplicationFinishedSubscriber (
506
- relativePathToCloverXml : 'tests/clover.xml ' ,
505
+ pathToCloverXml : 'tests/clover.xml ' ,
507
506
minCoverageRules: MinCoverageRules::fromInt (90 , true ),
508
507
cleanUpCloverXml: true ,
509
508
exitter: new Exitter (),
@@ -526,7 +525,7 @@ public function testFromConfigurationAndParametersFromFile(): void
526
525
{
527
526
$ this ->assertEquals (
528
527
expected: new ApplicationFinishedSubscriber (
529
- relativePathToCloverXml : 'tests/clover.xml ' ,
528
+ pathToCloverXml : 'tests/clover.xml ' ,
530
529
minCoverageRules: MinCoverageRules::fromConfigFile ('tests/Subscriber/Application/min-coverage-rules-success.php ' ),
531
530
cleanUpCloverXml: false ,
532
531
exitter: new Exitter (),
0 commit comments