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