packages/sql-semantics-sqlite/tests/Unit/Model/Statement/Reference/Missing/UndeclaredRoutineTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Model\Statement\Reference\Missing;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Small;
9use PHPUnit\Framework\TestCase;
10use SqlSemantics\Platform\Sqlite\Model\Statement\Identifier\Name;
11use SqlSemantics\Platform\Sqlite\Model\Statement\Identifier\QualifiedName;
12use SqlSemantics\Platform\Sqlite\Model\Statement\Reference\Missing\UndeclaredRoutine;
13
14#[CoversClass(UndeclaredRoutine::class)]
15#[Small]
16final class UndeclaredRoutineTest extends TestCase
17{
18    public function testDescribeNamesTheRoutine(): void
19    {
20        $name = new QualifiedName(new Name('score'));
21
22        $missing = new UndeclaredRoutine($name);
23
24        self::assertSame('the signature of routine score', $missing->describe());
25        self::assertSame($name, $missing->name);
26    }
27}
28