packages/sql-semantics-postgres/tests/Unit/Statement/Name/ImproperNameTest.php
1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Name;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Small;
9use PHPUnit\Framework\TestCase;
10use SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name;
11use SqlSemantics\Platform\PostgreSql\Statement\Name\DottedName;
12use SqlSemantics\Platform\PostgreSql\Statement\Name\ImproperName;
13
14#[CoversClass(ImproperName::class)]
15#[Small]
16final class ImproperNameTest extends TestCase
17{
18 public function testMessageNamesEveryPart(): void
19 {
20 self::assertSame('Improper qualified name (too many dotted names): a.b.', (new ImproperName(new DottedName([new Name('a'), new Name('b')])))->message());
21 }
22}
23