PHPSQLParser\Test\Parser\UnionTest::testUnion2 PHP Method

testUnion2() public method

public testUnion2 ( )
    public function testUnion2()
    {
        // TODO: the order-by clause has not been parsed
        $parser = new PHPSQLParser();
        $sql = '(SELECT colA From test a)
                union all
                (SELECT colB from test b) order by 1';
        $p = $parser->parse($sql, true);
        $expected = getExpectedValue(dirname(__FILE__), 'union2.serialized');
        $this->assertEquals($expected, $p, 'mysql union with order-by');
    }