summaryrefslogtreecommitdiffstats
path: root/tests/Utils/QueryTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Utils/QueryTest.php')
-rw-r--r--tests/Utils/QueryTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Utils/QueryTest.php b/tests/Utils/QueryTest.php
index 124b161..c835549 100644
--- a/tests/Utils/QueryTest.php
+++ b/tests/Utils/QueryTest.php
@@ -360,6 +360,23 @@ class QueryTest extends TestCase
),
Query::getAll($query)
);
+
+ $query = 'SELECT CASE WHEN 2 IS NULL THEN "this is true" ELSE "this is false" END';
+ $parser = new Parser($query);
+ $this->assertEquals(
+ array_merge(
+ Query::getFlags($parser->statements[0], true),
+ array(
+ 'parser' => $parser,
+ 'statement' => $parser->statements[0],
+ 'select_expr' => array(
+ 'CASE WHEN 2 IS NULL THEN "this is true" ELSE "this is false" END'
+ ),
+ 'select_tables' => array(),
+ )
+ ),
+ Query::getAll($query)
+ );
}
/**