optimizer = new FlattenNestedBool(); $this->simplifier = new FlattenSingleArgumentBinaryOperation(); } public function testOrs(): void { $operator = new SearchBinaryOperator( ISearchBinaryOperator::OPERATOR_OR, [ new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', 'foo'), new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_OR, [ new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', 'bar'), new SearchComparison(ISearchComparison::COMPARE_EQUAL, 'path', 'asd'), ]) ] ); $this->assertEquals('(path eq "foo" or (path eq "bar" or path eq "asd"))', $operator->__toString()); $this->optimizer->processOperator($operator); $this->simplifier->processOperator($operator); $this->assertEquals('(path eq "foo" or path eq "bar" or path eq "asd")', $operator->__toString()); } }