diff --git a/packages/realtime-compiler/tests/ConsoleOutputTest.php b/packages/realtime-compiler/tests/ConsoleOutputTest.php index b554e1e56cf..5a30fe55bf2 100644 --- a/packages/realtime-compiler/tests/ConsoleOutputTest.php +++ b/packages/realtime-compiler/tests/ConsoleOutputTest.php @@ -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())); +});