Skip to content

Commit

Permalink
Test with fancy output
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 10, 2023
1 parent 99ed9c1 commit c9e358f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/framework/tests/Feature/Commands/ServeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ public function test_hyde_serve_command_passes_through_process_output()
->assertExitCode(0);
}

public function testWithFancyOutput()
{
Process::fake(['php -S localhost:8080 {$this->binaryPath()}' => 'foo']);

$this->artisan('serve')
// ->expectsOutput('HydePHP Realtime Compiler') // Termwind output is not captured by Process::fake()
->assertExitCode(0);

Process::assertRan("php -S localhost:8080 {$this->binaryPath()}");
}

protected function binaryPath(): string
{
return Hyde::path('vendor/hyde/realtime-compiler/bin/server.php');
Expand Down

0 comments on commit c9e358f

Please sign in to comment.