Skip to content

Commit 9ab54d9

Browse files
committed
Preserve structured PHPUnit raw output
1 parent e5e137b commit 9ab54d9

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/Console/Command/TestsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ private function resolveStructuredProcessResultPayload(OutputInterface $processO
361361
];
362362
}
363363

364-
if (null !== $supplementalOutput && ! \is_array($decoded)) {
364+
if (null !== $supplementalOutput) {
365365
$payload['raw_output'] = $supplementalOutput;
366366
}
367367

tests/Console/Command/TestsCommandTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use FastForward\DevTools\Console\Command\Traits\LogsCommandResults;
2424
use FastForward\DevTools\Console\Command\TestsCommand;
2525
use FastForward\DevTools\Container\ContainerFactory;
26+
use FastForward\DevTools\Container\ServiceProvider\DevToolsServiceProvider;
2627
use FastForward\DevTools\Environment\RuntimeEnvironmentInterface;
2728
use FastForward\DevTools\Filesystem\FilesystemInterface;
2829
use FastForward\DevTools\PhpUnit\Bootstrap\BootstrapShimGenerator;
@@ -57,6 +58,7 @@
5758
#[UsesClass(BootstrapShimGenerator::class)]
5859
#[UsesClass(CoverageSummary::class)]
5960
#[UsesClass(ContainerFactory::class)]
61+
#[UsesClass(DevToolsServiceProvider::class)]
6062
#[UsesClass(DevToolsPathResolver::class)]
6163
#[UsesClass(ProcessBuilder::class)]
6264
#[UsesClass(ManagedWorkspace::class)]
@@ -428,7 +430,7 @@ public function executeWillCaptureStructuredPhpUnitSummaryAfterCoveragePreludeWh
428430
&& isset($context['output'])
429431
&& 'success' === $context['output']['result']
430432
&& 5 === $context['output']['summary']['assertions']
431-
&& ! isset($context['output']['raw_output'])),
433+
&& "Generating code coverage report in PHP format ... done [00:00.002]" === $context['output']['raw_output']),
432434
)->shouldBeCalled();
433435
$this->output->writeln(Argument::cetera())->shouldNotBeCalled();
434436

0 commit comments

Comments
 (0)