packages/sql-semantics-sqlite/tests/Unit/Statement/Schema/Problem/PrimaryKeyProblemTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Schema\Problem;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Small;
9use PHPUnit\Framework\TestCase;
10use SqlSemantics\Platform\Sqlite\Statement\Schema\Problem\PrimaryKeyFlaw;
11use SqlSemantics\Platform\Sqlite\Statement\Schema\Problem\PrimaryKeyProblem;
12
13#[CoversClass(PrimaryKeyProblem::class)]
14#[Small]
15final class PrimaryKeyProblemTest extends TestCase
16{
17    public function testMessageDescribesTheFlaw(): void
18    {
19        self::assertSame('A WITHOUT ROWID table needs a primary key.', (new PrimaryKeyProblem(PrimaryKeyFlaw::MissingWithoutRowid))->message());
20    }
21}
22