PhpBench\Tests\Unit\Expression\ParserTest::testCompositeConstraints PHP Method

testCompositeConstraints() public method

It should allow composite constraints.
    public function testCompositeConstraints()
    {
        $composite = $this->parser->parse('
$and: [
    {
        $or: [
            { benchmark: { $eq: "foo" } }, 
            { subject: { $eq: "bar" } }
        ]
    },
    {
        subject.revs: { $eq: 5000 }
    }
]
');
        $this->assertEquals(new Composite('$and', new Composite('$or', new Comparison('$eq', 'benchmark', 'foo'), new Comparison('$eq', 'subject', 'bar')), new Comparison('$eq', 'subject.revs', 5000)), $composite);
    }