joomla/joomla-platform — pull request #1629 by MarkRS-UK (2012-10-22 22:55:48+00:00)
Title: Union - updated functionality and unit test

This is an update to pull request joomla/joomla-platform#1539 and implements the changes required to make the general syntax

$q->select(a query)->union(another query)

generate correct SQL for a union query, which is not currently the case.

I've added a unit test for correct SQL in this instance, and modified the "testUnionClear" test to "testUnionNotClear", since "ORDER" can be used in this version of an SQL query.