packages/sql-semantics/tests/Unit/Statement/ElementTest.php
1<?php
2
3declare(strict_types=1);
4
5namespace Tests\Unit\Statement;
6
7use PHPUnit\Framework\Attributes\CoversClass;
8use PHPUnit\Framework\Attributes\Medium;
9use PHPUnit\Framework\Attributes\UsesClass;
10use PHPUnit\Framework\TestCase;
11
12#[CoversClass(\SqlSemantics\Statement\Element::class)]
13#[UsesClass(\SqlSemantics\Core\Analysis\Analyzer::class)]
14#[UsesClass(\SqlSemantics\Core\Analysis\ValueReader::class)]
15#[UsesClass(\SqlSemantics\Core\AnalysisException::class)]
16#[UsesClass(\SqlSemantics\Facade\Semantics::class)]
17#[UsesClass(\SqlSemantics\Statement\Statement::class)]
18#[UsesClass(\SqlSemantics\Statement\Writer::class)]
19#[UsesClass(\SqlSemantics\Statement\Assertion::class)]
20#[UsesClass(\SqlSemantics\Statement\ImmutableGraph::class)]
21#[UsesClass(\SqlSemantics\Core\Ast\DialectParser::class)]
22#[UsesClass(\SqlSemantics\Platform\MySql\Platform::class)]
23#[UsesClass(\SqlSemantics\Platform\PostgreSql\Platform::class)]
24#[UsesClass(\SqlSemantics\Platform\Sqlite\Platform::class)]
25#[Medium]
26final class ElementTest extends TestCase
27{
28 public function testWriteWithConcreteCommand(): void
29 {
30 $command = new \SqlSemantics\Statement\Model\Sqlite\Value\CmdWithCommitEndTransOpt_ccca6149('COMMIT', new \SqlSemantics\Statement\Model\Sqlite\Value\TransOptWith_6ac05548());
31 $writer = new \SqlSemantics\Statement\Writer();
32 $command->write($writer);
33 self::assertSame('COMMIT', $writer->toString());
34 }
35}
36