packages/sql-fixture/tests/Unit/Plan/Exception/EmptyPlanExceptionTest.php

1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Plan\Exception;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\UsesClass;
9use PHPUnit\Framework\TestCase;
10
11#[CoversClass(\SqlFixture\Plan\Exception\EmptyPlanException::class)]
12#[UsesClass(\SqlFixture\Plan\PlanSyntaxException::class)]
13#[UsesClass(\SqlFixture\Plan\Exception\EmptyTableNameException::class)]
14#[UsesClass(\SqlFixture\Plan\Exception\MissingEndpointColumnsException::class)]
15#[UsesClass(\SqlFixture\Plan\Exception\InvalidTableNameException::class)]
16#[UsesClass(\SqlFixture\Plan\Exception\UnbalancedBracketsException::class)]
17#[UsesClass(\SqlFixture\Plan\Exception\UnexpectedPlanTokenException::class)]
18#[UsesClass(\SqlFixture\Plan\Exception\UnsupportedManyToManyException::class)]
19#[UsesClass(\SqlFixture\Plan\Exception\CompositeArityMismatchException::class)]
20final class EmptyPlanExceptionTest extends TestCase
21{
22    public function testDescribesEmptyPlan(): void
23    {
24        $exception = new \SqlFixture\Plan\Exception\EmptyPlanException();
25        self::assertSame(
26            'A fixture plan must name at least one table.',
27            $exception->getMessage()
28        );
29    }
30}
31