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