packages/sql-semantics-mysql/tests/Unit/Statement/Dml/Prepared/DeallocateTest.php
1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement\Dml\Prepared;
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\Dml\Prepared\Deallocate;
12
13#[CoversClass(Deallocate::class)]
14#[Medium]
15final class DeallocateTest extends TestCase
16{
17 public function testDeriveStatementRecordsNothing(): void
18 {
19 $operation = (new Semantics())->analyze('DEALLOCATE PREPARE s');
20
21 self::assertNull($operation->facts->output);
22 }
23
24 public function testRenderWritesDeallocate(): void
25 {
26 self::assertSame('DEALLOCATE PREPARE s', (new Semantics('mysql-5.6.51'))->analyze('drop prepare s')->toString());
27 }
28}
29