summaryrefslogtreecommitdiffstats
path: root/tests/Components/IntoKeywordTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Components/IntoKeywordTest.php')
-rw-r--r--tests/Components/IntoKeywordTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Components/IntoKeywordTest.php b/tests/Components/IntoKeywordTest.php
new file mode 100644
index 0000000..ee30f09
--- /dev/null
+++ b/tests/Components/IntoKeywordTest.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace SqlParser\Tests\Components;
+
+use SqlParser\Parser;
+use SqlParser\Components\IntoKeyword;
+
+use SqlParser\Tests\TestCase;
+
+class IntoKeywordTest extends TestCase
+{
+
+ public function testParse()
+ {
+ $component = IntoKeyword::parse(new Parser(), $this->getTokensList('OUTFILE "/tmp/outfile.txt"'));
+ $this->assertEquals($component->type, 'OUTFILE');
+ $this->assertEquals($component->dest, '/tmp/outfile.txt');
+ }
+
+ public function testParseErr1()
+ {
+ $component = IntoKeyword::parse(new Parser(), $this->getTokensList('OUTFILE;'));
+ $this->assertEquals($component->type, 'OUTFILE');
+ }
+}