diff options
Diffstat (limited to 'tests/Builder/ExplainStatement.php')
-rw-r--r-- | tests/Builder/ExplainStatement.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Builder/ExplainStatement.php b/tests/Builder/ExplainStatement.php new file mode 100644 index 0000000..1a44f44 --- /dev/null +++ b/tests/Builder/ExplainStatement.php @@ -0,0 +1,24 @@ +<?php + +namespace SqlParser\Tests\Builder; + +use SqlParser\Parser; + +use SqlParser\Tests\TestCase; + +class ExplainStatementTest extends TestCase +{ + + public function testBuilderView() + { + $query = 'EXPLAIN SELECT * FROM test;'; + + $parser = new Parser($query); + $stmt = $parser->statements[0]; + + $this->assertEquals( + ' EXPLAIN SELECT * FROM test', + $stmt->build() + ); + } +} |