packages/sql-semantics-postgres/tests/Unit/Statement/Constraint/Reference/KeyMatchTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Constraint\Reference;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Medium;
9use PHPUnit\Framework\TestCase;
10
11#[CoversClass(\SqlSemantics\Platform\PostgreSql\Statement\Constraint\Reference\KeyMatch::class)]
12#[Medium]
13final class KeyMatchTest extends TestCase
14{
15    public function testCasesSpellTheMatchTypes(): void
16    {
17        self::assertSame([
18          0 => 'FULL',
19          1 => 'PARTIAL',
20          2 => 'SIMPLE',
21        ], array_map(static fn ($match): string => $match->value, \SqlSemantics\Platform\PostgreSql\Statement\Constraint\Reference\KeyMatch::cases()));
22    }
23}
24