packages/sql-semantics-mysql/tests/Unit/Statement/Alter/Partition/UpgradePartitioningTest.php
1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Alter\Partition;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Medium;
9use PHPUnit\Framework\TestCase;
10use SqlSemantics\Platform\MySql\Semantics;
11use SqlSemantics\Platform\MySql\Statement\Alter\Partition\UpgradePartitioning;
12
13#[CoversClass(UpgradePartitioning::class)]
14#[Medium]
15final class UpgradePartitioningTest extends TestCase
16{
17 public function testDeriveCommandDerivesNothing(): void
18 {
19 self::assertSame([], (new Semantics('mysql-5.7.44'))->analyze('ALTER TABLE t UPGRADE PARTITIONING')->facts->diagnostics);
20 }
21
22 public function testRenderWritesTheAction(): void
23 {
24 self::assertSame('ALTER TABLE t UPGRADE PARTITIONING', (new Semantics('mysql-5.7.44'))->analyze('ALTER TABLE t UPGRADE PARTITIONING')->toString());
25 }
26}
27