From e5aeedb59cf099edd2194049dc8f39b7e6fbc0d0 Mon Sep 17 00:00:00 2001 From: Brent Roose Date: Fri, 19 Apr 2024 14:03:17 +0200 Subject: [PATCH] Testing --- app/Console/Package.php | 14 ++++++++++++++ src/GenericConsoleOutput.php | 4 ++-- ...nentLanguage.php => TempestConsoleLanguage.php} | 2 +- src/Testing/TestConsoleOutput.php | 6 +++--- 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 app/Console/Package.php rename src/Highlight/{ConsoleComponentLanguage.php => TempestConsoleLanguage.php} (94%) diff --git a/app/Console/Package.php b/app/Console/Package.php new file mode 100644 index 0000000..aa5e9f5 --- /dev/null +++ b/app/Console/Package.php @@ -0,0 +1,14 @@ +parse($content, new ConsoleComponentLanguage()), + $highlighter->parse($content, new TempestConsoleLanguage()), ); fclose($stdout); diff --git a/src/Highlight/ConsoleComponentLanguage.php b/src/Highlight/TempestConsoleLanguage.php similarity index 94% rename from src/Highlight/ConsoleComponentLanguage.php rename to src/Highlight/TempestConsoleLanguage.php index 7be1f28..ec74d2e 100644 --- a/src/Highlight/ConsoleComponentLanguage.php +++ b/src/Highlight/TempestConsoleLanguage.php @@ -15,7 +15,7 @@ use Tempest\Console\Highlight\Injections\UnderlineInjection; use Tempest\Highlight\Language; -final readonly class ConsoleComponentLanguage implements Language +final readonly class TempestConsoleLanguage implements Language { public function getName(): string { diff --git a/src/Testing/TestConsoleOutput.php b/src/Testing/TestConsoleOutput.php index 93abe4d..81eb426 100644 --- a/src/Testing/TestConsoleOutput.php +++ b/src/Testing/TestConsoleOutput.php @@ -5,7 +5,7 @@ namespace Tempest\Console\Testing; use Tempest\Console\ConsoleOutput; -use Tempest\Console\Highlight\ConsoleComponentLanguage; +use Tempest\Console\Highlight\TempestConsoleLanguage; use Tempest\Highlight\Highlighter; use Tempest\Highlight\Themes\LightTerminalTheme; use Tempest\Highlight\Themes\TerminalStyle; @@ -31,7 +31,7 @@ public function write(string $line): ConsoleOutput { $highlighter = new Highlighter(new LightTerminalTheme()); - $line = $highlighter->parse($line, new ConsoleComponentLanguage()); + $line = $highlighter->parse($line, new TempestConsoleLanguage()); $this->lines[] = $line; @@ -42,7 +42,7 @@ public function writeln(string $line = ''): ConsoleOutput { $highlighter = new Highlighter(new LightTerminalTheme()); - $line = $highlighter->parse($line, new ConsoleComponentLanguage()); + $line = $highlighter->parse($line, new TempestConsoleLanguage()); $this->lines[] = $line;