public function testMultipleComposite()
{
$composite = $this->parser->parse('
$and: [
{ benchmark: "foobar" },
{ number: { $gt: 2015 } },
{ name: "daniel" }
]
');
$this->assertEquals(new Composite('$and', new Composite('$and', new Comparison('$eq', 'benchmark', 'foobar'), new Comparison('$gt', 'number', 2015)), new Comparison('$eq', 'name', 'daniel')), $composite);
$composite = $this->parser->parse('
$and: [
{ benchmark: "foobar" },
{ number: { $gt: 2015 } },
{ name: "daniel" },
{ barbar: "booboo" }
]
');
$this->assertEquals(new Composite('$and', new Composite('$and', new Composite('$and', new Comparison('$eq', 'benchmark', 'foobar'), new Comparison('$gt', 'number', 2015)), new Comparison('$eq', 'name', 'daniel')), new Comparison('$eq', 'barbar', 'booboo')), $composite);
}