packages/sql-semantics-mysql/tests/Unit/Statement/Utility/Problem/TableOrViewTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Utility\Problem;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Small;
9use PHPUnit\Framework\TestCase;
10use SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name;
11use SqlSemantics\Platform\MySql\Model\Statement\Identifier\QualifiedName;
12use SqlSemantics\Platform\MySql\Statement\Utility\Problem\TableOrView;
13
14#[CoversClass(TableOrView::class)]
15#[Small]
16final class TableOrViewTest extends TestCase
17{
18    public function testDescribeNamesTheRelation(): void
19    {
20        self::assertSame('whether db.t is a base table or a view', (new TableOrView(new QualifiedName(new Name('t'), new Name('db'))))->describe());
21    }
22}
23