diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2015-07-19 14:36:53 +0300 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2015-07-19 14:36:53 +0300 |
commit | 5e554b3534c44f122906fea36ef7698a5769316b (patch) | |
tree | 4cd766c505b0f93498eccc6d75f9446b21f6a5a4 /tests/Components/ExpressionArrayTest.php | |
parent | b894375c04eb138f4c541623e644be8364ff11de (diff) | |
download | sql-parser-5e554b3534c44f122906fea36ef7698a5769316b.zip sql-parser-5e554b3534c44f122906fea36ef7698a5769316b.tar.gz sql-parser-5e554b3534c44f122906fea36ef7698a5769316b.tar.bz2 |
Avoid processing the alias twice and generate an error.
Errors are triggered when an unexpected token is found between clauses.
Refactoring.
Diffstat (limited to 'tests/Components/ExpressionArrayTest.php')
-rw-r--r-- | tests/Components/ExpressionArrayTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/Components/ExpressionArrayTest.php b/tests/Components/ExpressionArrayTest.php index ea772e3..0fad913 100644 --- a/tests/Components/ExpressionArrayTest.php +++ b/tests/Components/ExpressionArrayTest.php @@ -21,4 +21,17 @@ class ExpressionArrayTest extends TestCase ); $this->assertEquals(array(), $component); } + + public function testParse2() + { + $component = ExpressionArray::parse( + new Parser(), + $this->getTokensList('(expr) +'), + array( + 'bracketsDelimited' => true, + ) + ); + $this->assertEquals(1, count($component)); + $this->assertEquals('(expr)', $component[0]->expr); + } } |