/** * Tests the \Joomla\Database\DatabaseQuery::union method. * * @return void * * @covers \Joomla\Database\DatabaseQuery::union * @since 1.0 */ public function testUnionTwo() { TestHelper::setValue($this->instance, 'union', null); $this->instance->union('SELECT name FROM foo'); $this->instance->union('SELECT name FROM bar'); $teststring = (string) TestHelper::getValue($this->instance, 'union'); $this->assertThat($teststring, $this->equalTo(PHP_EOL . "UNION (SELECT name FROM foo)" . PHP_EOL . "UNION (SELECT name FROM bar)"), 'Tests rendered query with two unions sequentially.'); }