summaryrefslogtreecommitdiffstats
path: root/tests/Components/JoinKeywordTest.php
diff options
context:
space:
mode:
authorDan Ungureanu <udan1107@gmail.com>2016-02-21 18:43:04 +0200
committerDan Ungureanu <udan1107@gmail.com>2016-02-21 18:45:18 +0200
commitad8407a13a8af04e9553b6c4e4068a4d5638bf72 (patch)
treeb5325a0b5d816c71d2590fa54f25b5d20e2d088a /tests/Components/JoinKeywordTest.php
parent3498a4d12596e2688b60607471515179cf8b4206 (diff)
downloadsql-parser-ad8407a13a8af04e9553b6c4e4068a4d5638bf72.zip
sql-parser-ad8407a13a8af04e9553b6c4e4068a4d5638bf72.tar.gz
sql-parser-ad8407a13a8af04e9553b6c4e4068a4d5638bf72.tar.bz2
JoinKeyword: Added tests.
Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
Diffstat (limited to 'tests/Components/JoinKeywordTest.php')
-rw-r--r--tests/Components/JoinKeywordTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Components/JoinKeywordTest.php b/tests/Components/JoinKeywordTest.php
index 1130f5c..e14c62c 100644
--- a/tests/Components/JoinKeywordTest.php
+++ b/tests/Components/JoinKeywordTest.php
@@ -16,6 +16,16 @@ class JoinKeywordTest extends TestCase
$this->assertEquals(1, count($component));
$this->assertEquals('a', $component[0]->expr->expr);
$this->assertEquals(null, $component[0]->on);
+ $this->assertEquals(null, $component[0]->using);
+ }
+
+ public function testParseIncompleteUsing()
+ {
+ $component = JoinKeyword::parse(new Parser(), $this->getTokensList('JOIN table2 USING (id)'));
+ $this->assertEquals(1, count($component));
+ $this->assertEquals('table2', $component[0]->expr->expr);
+ $this->assertEquals(null, $component[0]->on);
+ $this->assertEquals(array('id'), $component[0]->using->values);
}
public function testBuild()