Skip to content

Commit

Permalink
Test start message method
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 12, 2023
1 parent 586cf18 commit de97d92
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/realtime-compiler/tests/ConsoleOutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,22 @@

Styles::flush();
});

test('printStartMessage method', function () {
// Todo handle version dynamically

$output = new \Hyde\RealtimeCompiler\ConsoleOutput();
$output->printStartMessage('localhost', 8000);
$this->assertSame(<<<'TXT'
╭────────────────────────────────────╮
│ │
│ HydePHP Realtime Compiler v1.3.3 │
│ │
│ Listening on http://localhost:8000 │
│ │
╰────────────────────────────────────╯


TXT, str_replace(["\u{A0}", "\r"], [' ', ''], $this->output->fetch()));
});

0 comments on commit de97d92

Please sign in to comment.