packages/sql-parser/tests/Unit/Grammar/UnknownSymbolExceptionTest.php
1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Grammar;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Small;
9use PHPUnit\Framework\TestCase;
10use SqlParser\Grammar\UnknownSymbolException;
11
12#[CoversClass(UnknownSymbolException::class)]
13#[Small]
14final class UnknownSymbolExceptionTest extends TestCase
15{
16 public function testMessageNamesTheSymbol(): void
17 {
18 $exception = new UnknownSymbolException('expr_list');
19
20 self::assertSame('expr_list', $exception->symbol);
21 self::assertSame('Unknown grammar symbol: expr_list', $exception->getMessage());
22 }
23}
24