packages/sql-semantics-postgres/tests/Unit/Statement/Invocation/Problem/WindowProblemTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Invocation\Problem;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Small;
9use PHPUnit\Framework\TestCase;
10use SqlSemantics\Platform\PostgreSql\Statement\Invocation\Problem\WindowProblem;
11use SqlSemantics\Platform\PostgreSql\Statement\Invocation\Problem\WindowProblemKind;
12
13#[CoversClass(WindowProblem::class)]
14#[Small]
15final class WindowProblemTest extends TestCase
16{
17    public function testMessageIsTheServerMessage(): void
18    {
19        self::assertSame('GROUPS mode requires an ORDER BY clause', (new WindowProblem(WindowProblemKind::GroupsWithoutOrder))->message());
20    }
21}
22