packages/sql-semantics-postgres/tests/Unit/Statement/Name/RoleSpecKindTest.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\Statement\Name\RoleSpecKind;
11
12#[CoversClass(RoleSpecKind::class)]
13#[Small]
14final class RoleSpecKindTest extends TestCase
15{
16    public function testCasesMirrorTheRoleSpecificationKindsOfTheServer(): void
17    {
18        self::assertSame(['Named', 'Everyone', 'CurrentRole', 'CurrentUser', 'SessionUser'], array_map(static fn (RoleSpecKind $kind): string => $kind->name, RoleSpecKind::cases()));
19    }
20}
21