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);
}