public function testCompileCompositePredicateWithNullValues() { $predicate = new LiteralPredicate('bacon'); $andPredicate = $predicate->andPredicate(new NullPredicate()); $orPredicate = $predicate->orPredicate(new NullPredicate()); $compiler = new QueryPredicateVisitor(); $this->assertEquals('bacon', $compiler->compile($andPredicate)); $this->assertEquals('bacon', $compiler->compile($orPredicate)); }
/** * @param LiteralPredicate $predicate */ public function visitLiteralPredicate(LiteralPredicate $predicate) { $this->expression = $predicate->getPredicateValue(); }
public function testGetPredicateValueReturnsLiteralValue() { $value = 'test value'; $predicate = new LiteralPredicate($value); $this->assertEquals($value, $predicate->getPredicateValue()); }