File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
tests/Subscriber/Application Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ return [
9393This example will enforce:
9494
9595- A minimum total coverage of * 20%*
96- - A minimum coverage of * 80%* for all classes in namespace ` RobinIngelbrecht\PHPUnitCoverageTools ` , but will ` exit = 1 ` if it fails
96+ - A minimum coverage of * 80%* for all classes in namespace ` RobinIngelbrecht\PHPUnitCoverageTools ` , but will NOT ` exit = 1 ` if it fails
9797- * 100%* code coverage for the class ` ApplicationFinishedSubscriber `
9898- * 100%* code coverage for the classes ending with ` CommandHandler `
9999
Original file line number Diff line number Diff line change @@ -381,6 +381,28 @@ public function testFromConfigurationAndParameters(): void
381381 );
382382 }
383383
384+ public function testFromConfigurationAndParameters2 (): void
385+ {
386+ $ this ->assertEquals (
387+ new ApplicationFinishedSubscriber (
388+ relativePathToCloverXml: 'tests/clover.xml ' ,
389+ minCoverageRules: MinCoverageRules::fromInt (90 , true ),
390+ cleanUpCloverXml: true ,
391+ exitter: new Exitter (),
392+ consoleOutput: new ConsoleOutput (new \Symfony \Component \Console \Output \ConsoleOutput ()),
393+ ),
394+ ApplicationFinishedSubscriber::fromConfigurationAndParameters (
395+ (new Builder ())->build ([
396+ '--coverage-clover=tests/clover.xml ' ,
397+ ]),
398+ ParameterCollection::fromArray ([
399+ 'exitOnLowCoverage ' => '1 ' ,
400+ ]),
401+ ['--min-coverage=90 ' , '--clean-up-clover-xml ' ]
402+ ),
403+ );
404+ }
405+
384406 public function testFromConfigurationAndParametersFromFile (): void
385407 {
386408 $ this ->assertEquals (
You can’t perform that action at this time.
0 commit comments