@@ -343,81 +343,75 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
343
343
$ coverageFilterFromOption = false ;
344
344
$ codeCoverageReports = 0 ;
345
345
346
- if (!isset ($ arguments ['noLogging ' ])) {
347
- if (isset ($ arguments ['testdoxHTMLFile ' ])) {
348
- $ result ->addListener (
349
- new HtmlResultPrinter (
350
- $ arguments ['testdoxHTMLFile ' ],
351
- $ arguments ['testdoxGroups ' ],
352
- $ arguments ['testdoxExcludeGroups ' ]
353
- )
354
- );
355
- }
356
-
357
- if (isset ($ arguments ['testdoxTextFile ' ])) {
358
- $ result ->addListener (
359
- new TextResultPrinter (
360
- $ arguments ['testdoxTextFile ' ],
361
- $ arguments ['testdoxGroups ' ],
362
- $ arguments ['testdoxExcludeGroups ' ]
363
- )
364
- );
365
- }
346
+ if (isset ($ arguments ['testdoxHTMLFile ' ])) {
347
+ $ result ->addListener (
348
+ new HtmlResultPrinter (
349
+ $ arguments ['testdoxHTMLFile ' ],
350
+ $ arguments ['testdoxGroups ' ],
351
+ $ arguments ['testdoxExcludeGroups ' ]
352
+ )
353
+ );
354
+ }
366
355
367
- if (isset ($ arguments ['testdoxXMLFile ' ])) {
368
- $ result ->addListener (
369
- new XmlResultPrinter (
370
- $ arguments ['testdoxXMLFile ' ]
371
- )
372
- );
373
- }
356
+ if (isset ($ arguments ['testdoxTextFile ' ])) {
357
+ $ result ->addListener (
358
+ new TextResultPrinter (
359
+ $ arguments ['testdoxTextFile ' ],
360
+ $ arguments ['testdoxGroups ' ],
361
+ $ arguments ['testdoxExcludeGroups ' ]
362
+ )
363
+ );
364
+ }
374
365
375
- if (isset ($ arguments ['teamcityLogfile ' ])) {
376
- $ result ->addListener (
377
- new TeamCity ($ arguments ['teamcityLogfile ' ])
378
- );
379
- }
366
+ if (isset ($ arguments ['testdoxXMLFile ' ])) {
367
+ $ result ->addListener (
368
+ new XmlResultPrinter (
369
+ $ arguments ['testdoxXMLFile ' ]
370
+ )
371
+ );
372
+ }
380
373
381
- if (isset ($ arguments ['junitLogfile ' ])) {
382
- $ result ->addListener (
383
- new JUnit (
384
- $ arguments ['junitLogfile ' ],
385
- $ arguments ['reportUselessTests ' ]
386
- )
387
- );
388
- }
374
+ if (isset ($ arguments ['teamcityLogfile ' ])) {
375
+ $ result ->addListener (
376
+ new TeamCity ($ arguments ['teamcityLogfile ' ])
377
+ );
378
+ }
389
379
390
- if (isset ($ arguments ['coverageClover ' ])) {
391
- $ codeCoverageReports ++;
392
- }
380
+ if (isset ($ arguments ['junitLogfile ' ])) {
381
+ $ result ->addListener (
382
+ new JUnit (
383
+ $ arguments ['junitLogfile ' ],
384
+ $ arguments ['reportUselessTests ' ]
385
+ )
386
+ );
387
+ }
393
388
394
- if (isset ($ arguments ['coverageCobertura ' ])) {
395
- $ codeCoverageReports ++;
396
- }
389
+ if (isset ($ arguments ['coverageClover ' ])) {
390
+ $ codeCoverageReports ++;
391
+ }
397
392
398
- if (isset ($ arguments ['coverageCrap4J ' ])) {
399
- $ codeCoverageReports ++;
400
- }
393
+ if (isset ($ arguments ['coverageCobertura ' ])) {
394
+ $ codeCoverageReports ++;
395
+ }
401
396
402
- if (isset ($ arguments ['coverageHtml ' ])) {
403
- $ codeCoverageReports ++;
404
- }
397
+ if (isset ($ arguments ['coverageCrap4J ' ])) {
398
+ $ codeCoverageReports ++;
399
+ }
405
400
406
- if (isset ($ arguments ['coveragePHP ' ])) {
407
- $ codeCoverageReports ++;
408
- }
401
+ if (isset ($ arguments ['coverageHtml ' ])) {
402
+ $ codeCoverageReports ++;
403
+ }
409
404
410
- if (isset ($ arguments ['coverageText ' ])) {
411
- $ codeCoverageReports ++;
412
- }
405
+ if (isset ($ arguments ['coveragePHP ' ])) {
406
+ $ codeCoverageReports ++;
407
+ }
413
408
414
- if (isset ($ arguments ['coverageXml ' ])) {
415
- $ codeCoverageReports ++;
416
- }
409
+ if (isset ($ arguments ['coverageText ' ])) {
410
+ $ codeCoverageReports ++;
417
411
}
418
412
419
- if (isset ($ arguments ['noCoverage ' ])) {
420
- $ codeCoverageReports = 0 ;
413
+ if (isset ($ arguments ['coverageXml ' ])) {
414
+ $ codeCoverageReports++ ;
421
415
}
422
416
423
417
if ($ codeCoverageReports > 0 || isset ($ arguments ['xdebugFilterFile ' ])) {
@@ -904,46 +898,48 @@ private function handleConfiguration(array &$arguments): void
904
898
905
899
$ codeCoverageConfiguration = $ arguments ['configurationObject ' ]->codeCoverage ();
906
900
907
- if (!isset ($ arguments ['coverageClover ' ]) && $ codeCoverageConfiguration ->hasClover ()) {
908
- $ arguments ['coverageClover ' ] = $ codeCoverageConfiguration ->clover ()->target ()->path ();
909
- }
901
+ if (!isset ($ arguments ['noCoverage ' ])) {
902
+ if (!isset ($ arguments ['coverageClover ' ]) && $ codeCoverageConfiguration ->hasClover ()) {
903
+ $ arguments ['coverageClover ' ] = $ codeCoverageConfiguration ->clover ()->target ()->path ();
904
+ }
910
905
911
- if (!isset ($ arguments ['coverageCobertura ' ]) && $ codeCoverageConfiguration ->hasCobertura ()) {
912
- $ arguments ['coverageCobertura ' ] = $ codeCoverageConfiguration ->cobertura ()->target ()->path ();
913
- }
906
+ if (!isset ($ arguments ['coverageCobertura ' ]) && $ codeCoverageConfiguration ->hasCobertura ()) {
907
+ $ arguments ['coverageCobertura ' ] = $ codeCoverageConfiguration ->cobertura ()->target ()->path ();
908
+ }
914
909
915
- if (!isset ($ arguments ['coverageCrap4J ' ]) && $ codeCoverageConfiguration ->hasCrap4j ()) {
916
- $ arguments ['coverageCrap4J ' ] = $ codeCoverageConfiguration ->crap4j ()->target ()->path ();
910
+ if (!isset ($ arguments ['coverageCrap4J ' ]) && $ codeCoverageConfiguration ->hasCrap4j ()) {
911
+ $ arguments ['coverageCrap4J ' ] = $ codeCoverageConfiguration ->crap4j ()->target ()->path ();
917
912
918
- if (!isset ($ arguments ['crap4jThreshold ' ])) {
919
- $ arguments ['crap4jThreshold ' ] = $ codeCoverageConfiguration ->crap4j ()->threshold ();
913
+ if (!isset ($ arguments ['crap4jThreshold ' ])) {
914
+ $ arguments ['crap4jThreshold ' ] = $ codeCoverageConfiguration ->crap4j ()->threshold ();
915
+ }
920
916
}
921
- }
922
917
923
- if (!isset ($ arguments ['coverageHtml ' ]) && $ codeCoverageConfiguration ->hasHtml ()) {
924
- $ arguments ['coverageHtml ' ] = $ codeCoverageConfiguration ->html ()->target ()->path ();
918
+ if (!isset ($ arguments ['coverageHtml ' ]) && $ codeCoverageConfiguration ->hasHtml ()) {
919
+ $ arguments ['coverageHtml ' ] = $ codeCoverageConfiguration ->html ()->target ()->path ();
925
920
926
- if (!isset ($ arguments ['reportLowUpperBound ' ])) {
927
- $ arguments ['reportLowUpperBound ' ] = $ codeCoverageConfiguration ->html ()->lowUpperBound ();
928
- }
921
+ if (!isset ($ arguments ['reportLowUpperBound ' ])) {
922
+ $ arguments ['reportLowUpperBound ' ] = $ codeCoverageConfiguration ->html ()->lowUpperBound ();
923
+ }
929
924
930
- if (!isset ($ arguments ['reportHighLowerBound ' ])) {
931
- $ arguments ['reportHighLowerBound ' ] = $ codeCoverageConfiguration ->html ()->highLowerBound ();
925
+ if (!isset ($ arguments ['reportHighLowerBound ' ])) {
926
+ $ arguments ['reportHighLowerBound ' ] = $ codeCoverageConfiguration ->html ()->highLowerBound ();
927
+ }
932
928
}
933
- }
934
929
935
- if (!isset ($ arguments ['coveragePHP ' ]) && $ codeCoverageConfiguration ->hasPhp ()) {
936
- $ arguments ['coveragePHP ' ] = $ codeCoverageConfiguration ->php ()->target ()->path ();
937
- }
930
+ if (!isset ($ arguments ['coveragePHP ' ]) && $ codeCoverageConfiguration ->hasPhp ()) {
931
+ $ arguments ['coveragePHP ' ] = $ codeCoverageConfiguration ->php ()->target ()->path ();
932
+ }
938
933
939
- if (!isset ($ arguments ['coverageText ' ]) && $ codeCoverageConfiguration ->hasText ()) {
940
- $ arguments ['coverageText ' ] = $ codeCoverageConfiguration ->text ()->target ()->path ();
941
- $ arguments ['coverageTextShowUncoveredFiles ' ] = $ codeCoverageConfiguration ->text ()->showUncoveredFiles ();
942
- $ arguments ['coverageTextShowOnlySummary ' ] = $ codeCoverageConfiguration ->text ()->showOnlySummary ();
943
- }
934
+ if (!isset ($ arguments ['coverageText ' ]) && $ codeCoverageConfiguration ->hasText ()) {
935
+ $ arguments ['coverageText ' ] = $ codeCoverageConfiguration ->text ()->target ()->path ();
936
+ $ arguments ['coverageTextShowUncoveredFiles ' ] = $ codeCoverageConfiguration ->text ()->showUncoveredFiles ();
937
+ $ arguments ['coverageTextShowOnlySummary ' ] = $ codeCoverageConfiguration ->text ()->showOnlySummary ();
938
+ }
944
939
945
- if (!isset ($ arguments ['coverageXml ' ]) && $ codeCoverageConfiguration ->hasXml ()) {
946
- $ arguments ['coverageXml ' ] = $ codeCoverageConfiguration ->xml ()->target ()->path ();
940
+ if (!isset ($ arguments ['coverageXml ' ]) && $ codeCoverageConfiguration ->hasXml ()) {
941
+ $ arguments ['coverageXml ' ] = $ codeCoverageConfiguration ->xml ()->target ()->path ();
942
+ }
947
943
}
948
944
949
945
$ phpunitConfiguration = $ arguments ['configurationObject ' ]->phpunit ();
@@ -1043,31 +1039,33 @@ private function handleConfiguration(array &$arguments): void
1043
1039
1044
1040
$ loggingConfiguration = $ arguments ['configurationObject ' ]->logging ();
1045
1041
1046
- if ($ loggingConfiguration ->hasText ()) {
1047
- $ arguments ['listeners ' ][] = new DefaultResultPrinter (
1048
- $ loggingConfiguration ->text ()->target ()->path (),
1049
- true
1050
- );
1051
- }
1042
+ if (!isset ($ arguments ['noLogging ' ])) {
1043
+ if ($ loggingConfiguration ->hasText ()) {
1044
+ $ arguments ['listeners ' ][] = new DefaultResultPrinter (
1045
+ $ loggingConfiguration ->text ()->target ()->path (),
1046
+ true
1047
+ );
1048
+ }
1052
1049
1053
- if (!isset ($ arguments ['teamcityLogfile ' ]) && $ loggingConfiguration ->hasTeamCity ()) {
1054
- $ arguments ['teamcityLogfile ' ] = $ loggingConfiguration ->teamCity ()->target ()->path ();
1055
- }
1050
+ if (!isset ($ arguments ['teamcityLogfile ' ]) && $ loggingConfiguration ->hasTeamCity ()) {
1051
+ $ arguments ['teamcityLogfile ' ] = $ loggingConfiguration ->teamCity ()->target ()->path ();
1052
+ }
1056
1053
1057
- if (!isset ($ arguments ['junitLogfile ' ]) && $ loggingConfiguration ->hasJunit ()) {
1058
- $ arguments ['junitLogfile ' ] = $ loggingConfiguration ->junit ()->target ()->path ();
1059
- }
1054
+ if (!isset ($ arguments ['junitLogfile ' ]) && $ loggingConfiguration ->hasJunit ()) {
1055
+ $ arguments ['junitLogfile ' ] = $ loggingConfiguration ->junit ()->target ()->path ();
1056
+ }
1060
1057
1061
- if (!isset ($ arguments ['testdoxHTMLFile ' ]) && $ loggingConfiguration ->hasTestDoxHtml ()) {
1062
- $ arguments ['testdoxHTMLFile ' ] = $ loggingConfiguration ->testDoxHtml ()->target ()->path ();
1063
- }
1058
+ if (!isset ($ arguments ['testdoxHTMLFile ' ]) && $ loggingConfiguration ->hasTestDoxHtml ()) {
1059
+ $ arguments ['testdoxHTMLFile ' ] = $ loggingConfiguration ->testDoxHtml ()->target ()->path ();
1060
+ }
1064
1061
1065
- if (!isset ($ arguments ['testdoxTextFile ' ]) && $ loggingConfiguration ->hasTestDoxText ()) {
1066
- $ arguments ['testdoxTextFile ' ] = $ loggingConfiguration ->testDoxText ()->target ()->path ();
1067
- }
1062
+ if (!isset ($ arguments ['testdoxTextFile ' ]) && $ loggingConfiguration ->hasTestDoxText ()) {
1063
+ $ arguments ['testdoxTextFile ' ] = $ loggingConfiguration ->testDoxText ()->target ()->path ();
1064
+ }
1068
1065
1069
- if (!isset ($ arguments ['testdoxXMLFile ' ]) && $ loggingConfiguration ->hasTestDoxXml ()) {
1070
- $ arguments ['testdoxXMLFile ' ] = $ loggingConfiguration ->testDoxXml ()->target ()->path ();
1066
+ if (!isset ($ arguments ['testdoxXMLFile ' ]) && $ loggingConfiguration ->hasTestDoxXml ()) {
1067
+ $ arguments ['testdoxXMLFile ' ] = $ loggingConfiguration ->testDoxXml ()->target ()->path ();
1068
+ }
1071
1069
}
1072
1070
1073
1071
$ testdoxGroupConfiguration = $ arguments ['configurationObject ' ]->testdoxGroups ();
0 commit comments