Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
brendt committed Apr 19, 2024
1 parent 60aaddb commit e5aeedb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions app/Console/Package.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace App\Console;

use Tempest\Console\ConsoleCommand;

final readonly class Package
{
#[ConsoleCommand]
public function list(): void {}

#[ConsoleCommand]
public function info(string $name): void {}
}
4 changes: 2 additions & 2 deletions src/GenericConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Tempest\Console;

use Tempest\Console\Highlight\ConsoleComponentLanguage;
use Tempest\Console\Highlight\TempestConsoleLanguage;
use Tempest\Highlight\Highlighter;
use Tempest\Highlight\Themes\LightTerminalTheme;

Expand Down Expand Up @@ -73,7 +73,7 @@ private function writeToStdOut(string $content): void

fwrite(
$stdout,
$highlighter->parse($content, new ConsoleComponentLanguage()),
$highlighter->parse($content, new TempestConsoleLanguage()),
);

fclose($stdout);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/Testing/TestConsoleOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit e5aeedb

Please sign in to comment.