diff --git a/tests/Unit/PhpUnitRunnerTest.php b/tests/Unit/PhpUnitRunnerTest.php index 5e6dcc4..4e38ffa 100644 --- a/tests/Unit/PhpUnitRunnerTest.php +++ b/tests/Unit/PhpUnitRunnerTest.php @@ -5,6 +5,7 @@ use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Symfony\Component\Process\Exception\ProcessFailedException; +use Symfony\Component\Process\Process; use tomkyle\FindRunTest\PhpUnitRunner; use tomkyle\FindRunTest\TestRunnerInterface; use tomkyle\FindRunTest\ConfigurableTestRunnerInterface; @@ -74,6 +75,7 @@ public function testSuccessExitEvenWhenNoTestFilesFound(): void public function testExceptionOnProcessFailureWhenInvoked(): void { $phpUnitRunner = new PhpUnitRunner(tests: $this->temporaryDirectory->path()); + $phpUnitRunner->useColors(Process::isTtySupported()); $this->expectException(\RuntimeException::class); $this->expectException(ProcessFailedException::class); @@ -96,6 +98,7 @@ public function testExceptionOnProcessFailureWhenInvoked(): void public function testExceptionOnProcessFailureWithRunTestMethod(): void { $phpUnitRunner = new PhpUnitRunner(tests: $this->temporaryDirectory->path()); + $phpUnitRunner->useColors(Process::isTtySupported()); $this->expectException(\RuntimeException::class); $this->expectException(ProcessFailedException::class);