From 0efe927ec4f1ed84e577749780abe6e160ba0f60 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 10 Nov 2023 21:23:57 +0100 Subject: [PATCH] Skip test when dependent class does not exist --- .../framework/tests/Feature/Commands/ServeCommandTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/framework/tests/Feature/Commands/ServeCommandTest.php b/packages/framework/tests/Feature/Commands/ServeCommandTest.php index e42bce5331f..7112b461ff8 100644 --- a/packages/framework/tests/Feature/Commands/ServeCommandTest.php +++ b/packages/framework/tests/Feature/Commands/ServeCommandTest.php @@ -9,6 +9,7 @@ use Hyde\Testing\TestCase; use Illuminate\Support\Facades\Process; use TypeError; +use Hyde\RealtimeCompiler\ConsoleOutput; /** * @covers \Hyde\Console\Commands\ServeCommand @@ -163,6 +164,10 @@ public function test_hyde_serve_command_passes_through_process_output() public function testWithFancyOutput() { + if (! class_exists(ConsoleOutput::class)) { + $this->markTestSkipped('ConsoleOutput class not found.'); + } + Process::fake(['php -S localhost:8080 {$this->binaryPath()}' => 'foo']); $this->artisan('serve')