@@ -106,6 +106,7 @@ public function run(array $argv): int
106
106
107
107
$ pharExtensions = null ;
108
108
$ extensionRequiresCodeCoverageCollection = false ;
109
+ $ extensionReplacesOutput = false ;
109
110
$ extensionReplacesProgressOutput = false ;
110
111
$ extensionReplacesResultOutput = false ;
111
112
@@ -118,6 +119,7 @@ public function run(array $argv): int
118
119
119
120
$ extensionRequirements = $ this ->bootstrapExtensions ($ configuration );
120
121
$ extensionRequiresCodeCoverageCollection = $ extensionRequirements ['requiresCodeCoverageCollection ' ];
122
+ $ extensionReplacesOutput = $ extensionRequirements ['replacesOutput ' ];
121
123
$ extensionReplacesProgressOutput = $ extensionRequirements ['replacesProgressOutput ' ];
122
124
$ extensionReplacesResultOutput = $ extensionRequirements ['replacesResultOutput ' ];
123
125
}
@@ -136,15 +138,18 @@ public function run(array $argv): int
136
138
137
139
$ printer = OutputFacade::init (
138
140
$ configuration ,
141
+ $ extensionReplacesOutput ,
139
142
$ extensionReplacesProgressOutput ,
140
143
$ extensionReplacesResultOutput
141
144
);
142
145
143
- $ this ->writeRuntimeInformation ($ printer , $ configuration );
144
- $ this ->writePharExtensionInformation ($ printer , $ pharExtensions );
145
- $ this ->writeRandomSeedInformation ($ printer , $ configuration );
146
+ if (!$ extensionReplacesResultOutput ) {
147
+ $ this ->writeRuntimeInformation ($ printer , $ configuration );
148
+ $ this ->writePharExtensionInformation ($ printer , $ pharExtensions );
149
+ $ this ->writeRandomSeedInformation ($ printer , $ configuration );
146
150
147
- $ printer ->print (PHP_EOL );
151
+ $ printer ->print (PHP_EOL );
152
+ }
148
153
149
154
$ this ->registerLogfileWriters ($ configuration );
150
155
@@ -191,7 +196,10 @@ public function run(array $argv): int
191
196
192
197
$ result = TestResultFacade::result ();
193
198
194
- OutputFacade::printResult ($ result , $ testDoxResult , $ duration );
199
+ if (!$ extensionReplacesResultOutput ) {
200
+ OutputFacade::printResult ($ result , $ testDoxResult , $ duration );
201
+ }
202
+
195
203
CodeCoverage::instance ()->generateReports ($ printer , $ configuration );
196
204
197
205
$ shellExitCode = (new ShellExitCodeCalculator )->calculate (
@@ -332,7 +340,7 @@ private function buildTestSuite(Configuration $configuration): TestSuite
332
340
}
333
341
334
342
/**
335
- * @psalm-return array{requiresCodeCoverageCollection: bool, replacesProgressOutput: bool, replacesResultOutput: bool}
343
+ * @psalm-return array{requiresCodeCoverageCollection: bool, replacesOutput: bool, replacesProgressOutput: bool, replacesResultOutput: bool}
336
344
*/
337
345
private function bootstrapExtensions (Configuration $ configuration ): array
338
346
{
@@ -361,6 +369,7 @@ private function bootstrapExtensions(Configuration $configuration): array
361
369
362
370
return [
363
371
'requiresCodeCoverageCollection ' => $ facade ->requiresCodeCoverageCollection (),
372
+ 'replacesOutput ' => $ facade ->replacesOutput (),
364
373
'replacesProgressOutput ' => $ facade ->replacesProgressOutput (),
365
374
'replacesResultOutput ' => $ facade ->replacesResultOutput (),
366
375
];
0 commit comments