Doctrine\Tests\ODM\PHPCR\Query\Builder\ConverterPhpcrTest::testDispatchSelect PHP Метод

testDispatchSelect() публичный Метод

public testDispatchSelect ( )
    public function testDispatchSelect()
    {
        $this->primeBuilder();
        $select = $this->qb->select()->field('alias_1.prop_1')->field('alias_1.prop_2');
        $res = $this->converter->dispatch($select);
        $this->assertCount(2, $res);
        $this->assertInstanceOf('PHPCR\\Query\\QOM\\ColumnInterface', $res[0]);
        $this->assertEquals('prop_1_phpcr', $res[0]->getPropertyName());
        $this->assertEquals('prop_1_phpcr', $res[0]->getColumnName());
        $this->assertEquals('prop_2_phpcr', $res[1]->getPropertyName());
        $this->assertEquals('prop_2_phpcr', $res[1]->getColumnName());
        $addSelect = $this->qb->addSelect()->field('alias_1.prop_3');
        $res = $this->converter->dispatch($addSelect);
        $this->assertCount(3, $res);
        $this->assertEquals('prop_3_phpcr', $res[2]->getPropertyName());
    }