@@ -176,10 +176,10 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
176
176
177
177
if ($ arguments ['cacheResult ' ]) {
178
178
if (!isset ($ arguments ['cacheResultFile ' ])) {
179
- if (isset ($ arguments ['configuration ' ])) {
180
- assert ($ arguments ['configuration ' ] instanceof Configuration);
179
+ if (isset ($ arguments ['configurationObject ' ])) {
180
+ assert ($ arguments ['configurationObject ' ] instanceof Configuration);
181
181
182
- $ cacheLocation = $ arguments ['configuration ' ]->filename ();
182
+ $ cacheLocation = $ arguments ['configurationObject ' ]->filename ();
183
183
} else {
184
184
$ cacheLocation = $ _SERVER ['PHP_SELF ' ];
185
185
}
@@ -429,10 +429,10 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
429
429
$ coverageFilterFromOption = true ;
430
430
}
431
431
432
- if (isset ($ arguments ['configuration ' ])) {
433
- assert ($ arguments ['configuration ' ] instanceof Configuration);
432
+ if (isset ($ arguments ['configurationObject ' ])) {
433
+ assert ($ arguments ['configurationObject ' ] instanceof Configuration);
434
434
435
- $ codeCoverageConfiguration = $ arguments ['configuration ' ]->codeCoverage ();
435
+ $ codeCoverageConfiguration = $ arguments ['configurationObject ' ]->codeCoverage ();
436
436
437
437
if ($ codeCoverageConfiguration ->hasNonEmptyListOfFilesToBeIncludedInCodeCoverageReport ()) {
438
438
$ coverageFilterFromConfigurationFile = true ;
@@ -489,10 +489,10 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
489
489
}
490
490
}
491
491
492
- if (isset ($ arguments ['configuration ' ])) {
493
- assert ($ arguments ['configuration ' ] instanceof Configuration);
492
+ if (isset ($ arguments ['configurationObject ' ])) {
493
+ assert ($ arguments ['configurationObject ' ] instanceof Configuration);
494
494
495
- $ codeCoverageConfiguration = $ arguments ['configuration ' ]->codeCoverage ();
495
+ $ codeCoverageConfiguration = $ arguments ['configurationObject ' ]->codeCoverage ();
496
496
497
497
if ($ codeCoverageConfiguration ->hasNonEmptyListOfFilesToBeIncludedInCodeCoverageReport ()) {
498
498
if ($ codeCoverageConfiguration ->includeUncoveredFiles ()) {
@@ -540,12 +540,12 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
540
540
$ this ->writeMessage ('Runtime ' , $ runtime );
541
541
}
542
542
543
- if (isset ($ arguments ['configuration ' ])) {
544
- assert ($ arguments ['configuration ' ] instanceof Configuration);
543
+ if (isset ($ arguments ['configurationObject ' ])) {
544
+ assert ($ arguments ['configurationObject ' ] instanceof Configuration);
545
545
546
546
$ this ->writeMessage (
547
547
'Configuration ' ,
548
- $ arguments ['configuration ' ]->filename ()
548
+ $ arguments ['configurationObject ' ]->filename ()
549
549
);
550
550
}
551
551
@@ -587,19 +587,19 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [
587
587
$ this ->writeMessage ('Warning ' , $ warning );
588
588
}
589
589
590
- if (isset ($ arguments ['configuration ' ])) {
591
- assert ($ arguments ['configuration ' ] instanceof Configuration);
590
+ if (isset ($ arguments ['configurationObject ' ])) {
591
+ assert ($ arguments ['configurationObject ' ] instanceof Configuration);
592
592
593
- if ($ arguments ['configuration ' ]->hasValidationErrors ()) {
594
- if ((new SchemaDetector )->detect ($ arguments ['configuration ' ]->filename ())->detected ()) {
593
+ if ($ arguments ['configurationObject ' ]->hasValidationErrors ()) {
594
+ if ((new SchemaDetector )->detect ($ arguments ['configurationObject ' ]->filename ())->detected ()) {
595
595
$ this ->writeMessage ('Warning ' , 'Your XML configuration validates against a deprecated schema. ' );
596
596
$ this ->writeMessage ('Suggestion ' , 'Migrate your XML configuration using "--migrate-configuration"! ' );
597
597
} else {
598
598
$ this ->write (
599
599
"\n Warning - The configuration file did not pass validation! \n The following problems have been detected: \n"
600
600
);
601
601
602
- $ this ->write ($ arguments ['configuration ' ]->validationErrors ());
602
+ $ this ->write ($ arguments ['configurationObject ' ]->validationErrors ());
603
603
604
604
$ this ->write ("\n Test results may not be as expected. \n\n" );
605
605
}
@@ -876,19 +876,18 @@ private function write(string $buffer): void
876
876
*/
877
877
private function handleConfiguration (array &$ arguments ): void
878
878
{
879
- if (isset ($ arguments ['configuration ' ]) &&
880
- !$ arguments ['configuration ' ] instanceof Configuration) {
881
- $ arguments ['configuration ' ] = (new Loader )->load ($ arguments ['configuration ' ]);
879
+ if (!isset ($ arguments ['configurationObject ' ]) && isset ($ arguments ['configuration ' ])) {
880
+ $ arguments ['configurationObject ' ] = (new Loader )->load ($ arguments ['configuration ' ]);
882
881
}
883
882
884
883
$ arguments ['debug ' ] = $ arguments ['debug ' ] ?? false ;
885
884
$ arguments ['filter ' ] = $ arguments ['filter ' ] ?? false ;
886
885
$ arguments ['listeners ' ] = $ arguments ['listeners ' ] ?? [];
887
886
888
- if (isset ($ arguments ['configuration ' ])) {
889
- (new PhpHandler )->handle ($ arguments ['configuration ' ]->php ());
887
+ if (isset ($ arguments ['configurationObject ' ])) {
888
+ (new PhpHandler )->handle ($ arguments ['configurationObject ' ]->php ());
890
889
891
- $ codeCoverageConfiguration = $ arguments ['configuration ' ]->codeCoverage ();
890
+ $ codeCoverageConfiguration = $ arguments ['configurationObject ' ]->codeCoverage ();
892
891
893
892
if (!isset ($ arguments ['coverageClover ' ]) && $ codeCoverageConfiguration ->hasClover ()) {
894
893
$ arguments ['coverageClover ' ] = $ codeCoverageConfiguration ->clover ()->target ()->path ();
@@ -928,7 +927,7 @@ private function handleConfiguration(array &$arguments): void
928
927
$ arguments ['coverageXml ' ] = $ codeCoverageConfiguration ->xml ()->target ()->path ();
929
928
}
930
929
931
- $ phpunitConfiguration = $ arguments ['configuration ' ]->phpunit ();
930
+ $ phpunitConfiguration = $ arguments ['configurationObject ' ]->phpunit ();
932
931
933
932
$ arguments ['backupGlobals ' ] = $ arguments ['backupGlobals ' ] ?? $ phpunitConfiguration ->backupGlobals ();
934
933
$ arguments ['backupStaticAttributes ' ] = $ arguments ['backupStaticAttributes ' ] ?? $ phpunitConfiguration ->backupStaticAttributes ();
@@ -994,7 +993,7 @@ private function handleConfiguration(array &$arguments): void
994
993
$ groupCliArgs = $ arguments ['groups ' ];
995
994
}
996
995
997
- $ groupConfiguration = $ arguments ['configuration ' ]->groups ();
996
+ $ groupConfiguration = $ arguments ['configurationObject ' ]->groups ();
998
997
999
998
if (!isset ($ arguments ['groups ' ]) && $ groupConfiguration ->hasInclude ()) {
1000
999
$ arguments ['groups ' ] = $ groupConfiguration ->include ()->asArrayOfStrings ();
@@ -1006,11 +1005,11 @@ private function handleConfiguration(array &$arguments): void
1006
1005
1007
1006
$ extensionHandler = new ExtensionHandler ;
1008
1007
1009
- foreach ($ arguments ['configuration ' ]->extensions () as $ extension ) {
1008
+ foreach ($ arguments ['configurationObject ' ]->extensions () as $ extension ) {
1010
1009
$ this ->addExtension ($ extensionHandler ->createHookInstance ($ extension ));
1011
1010
}
1012
1011
1013
- foreach ($ arguments ['configuration ' ]->listeners () as $ listener ) {
1012
+ foreach ($ arguments ['configurationObject ' ]->listeners () as $ listener ) {
1014
1013
$ arguments ['listeners ' ][] = $ extensionHandler ->createTestListenerInstance ($ listener );
1015
1014
}
1016
1015
@@ -1023,7 +1022,7 @@ private function handleConfiguration(array &$arguments): void
1023
1022
);
1024
1023
}
1025
1024
1026
- $ loggingConfiguration = $ arguments ['configuration ' ]->logging ();
1025
+ $ loggingConfiguration = $ arguments ['configurationObject ' ]->logging ();
1027
1026
1028
1027
if ($ loggingConfiguration ->hasText ()) {
1029
1028
$ arguments ['listeners ' ][] = new DefaultResultPrinter (
@@ -1052,7 +1051,7 @@ private function handleConfiguration(array &$arguments): void
1052
1051
$ arguments ['testdoxXMLFile ' ] = $ loggingConfiguration ->testDoxXml ()->target ()->path ();
1053
1052
}
1054
1053
1055
- $ testdoxGroupConfiguration = $ arguments ['configuration ' ]->testdoxGroups ();
1054
+ $ testdoxGroupConfiguration = $ arguments ['configurationObject ' ]->testdoxGroups ();
1056
1055
1057
1056
if (!isset ($ arguments ['testdoxGroups ' ]) && $ testdoxGroupConfiguration ->hasInclude ()) {
1058
1057
$ arguments ['testdoxGroups ' ] = $ testdoxGroupConfiguration ->include ()->asArrayOfStrings ();
0 commit comments