/** * @test */ public function itShouldWriteUnionAllFromGenericBuilder() { $unionAll = $this->writer->unionAll(); $unionAll->add(new Select('user')); $unionAll->add(new Select('user_email')); $expected = <<<SQL SELECT user.* FROM user UNION ALL SELECT user_email.* FROM user_email SQL; $this->assertEquals($expected, $this->writer->write($unionAll)); }
/** * @test */ public function itShouldCreateUnionAllObject() { $className = '\\NilPortugues\\Sql\\QueryBuilder\\Manipulation\\UnionAll'; $this->assertInstanceOf($className, $this->writer->unionAll()); }