summaryrefslogtreecommitdiffstats
path: root/tests/Components/JoinKeywordTest.php
diff options
context:
space:
mode:
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()