Doctrine\Tests\ODM\PHPCR\Query\Builder\ConverterPhpcrTest::testDispatchConstraintsComparison PHP Method

testDispatchConstraintsComparison() public method

public testDispatchConstraintsComparison ( $method, $expectedOperator )
    public function testDispatchConstraintsComparison($method, $expectedOperator)
    {
        $this->primeBuilder();
        $comparison = $this->qb->where()->{$method}()->field('alias_1.prop_1')->literal('foobar');
        $res = $this->converter->dispatch($comparison);
        $this->assertInstanceOf('PHPCR\\Query\\QOM\\ComparisonInterface', $res);
        $this->assertInstanceOf('PHPCR\\Query\\QOM\\PropertyValueInterface', $res->getOperand1());
        $this->assertInstanceOf('PHPCR\\Query\\QOM\\LiteralInterface', $res->getOperand2());
        $this->assertEquals($expectedOperator, $res->getOperator());
    }