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.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Utils/QueryTest.php b/tests/Utils/QueryTest.php
index c3a2f28..8dd2323 100644
--- a/tests/Utils/QueryTest.php
+++ b/tests/Utils/QueryTest.php
@@ -385,6 +385,21 @@ class QueryTest extends TestCase
'WHERE film_id > 0'
)
);
+
+ $parser = new Parser(
+ 'select supplier.city, supplier.id from supplier '
+ . 'union select customer.city, customer.id from customer'
+ );
+ $this->assertEquals(
+ 'select supplier.city, supplier.id from supplier '
+ . 'union select customer.city, customer.id from customer'
+ . ' ORDER BY city ',
+ Query::replaceClause(
+ $parser->statements[0],
+ $parser->list,
+ 'ORDER BY city'
+ )
+ );
}
public function testReplaceClauseOnlyKeyword()