packages/sql-semantics-mysql/tests/Unit/Statement/Expression/Problem/NotSupportedYetTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Expression\Problem;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Small;
9use PHPUnit\Framework\TestCase;
10use SqlSemantics\Platform\MySql\Statement\Expression\Problem\NotSupportedYet;
11
12#[CoversClass(NotSupportedYet::class)]
13#[Small]
14final class NotSupportedYetTest extends TestCase
15{
16    public function testMessageNamesTheForm(): void
17    {
18        self::assertSame("This version of MySQL doesn't yet support 'AT LOCAL'.", (new NotSupportedYet('AT LOCAL'))->message());
19    }
20
21    public function testAnUnnamedFormIsRejected(): void
22    {
23        $this->expectExceptionMessage('An unsupported form is named.');
24
25        new NotSupportedYet('');
26    }
27}
28