packages/sql-faker/tests/Unit/Compiler/GrammarParseExceptionTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Compiler;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\TestCase;
9use SqlFaker\Compiler\GrammarParseException;
10
11#[CoversClass(GrammarParseException::class)]
12final class GrammarParseExceptionTest extends TestCase
13{
14    public function testNoRulesParsedNamesTheBisonGrammar(): void
15    {
16        self::assertSame(
17            'No grammar rules parsed from the Bison grammar.',
18            GrammarParseException::noRulesParsed('Bison')->getMessage(),
19        );
20    }
21
22    public function testNoRulesParsedNamesTheLemonGrammar(): void
23    {
24        self::assertSame(
25            'No grammar rules parsed from the Lemon grammar.',
26            GrammarParseException::noRulesParsed('Lemon')->getMessage(),
27        );
28    }
29
30}
31