Exemplo n.º 1
0
 function it_should_restrict_with_or_condition(Comparison $comparison, Value $value, QueryBuilder $queryBuilder, ConstraintOrx $constraint, ConstraintComparison $comparisonConstraint)
 {
     $queryBuilder->orWhere()->willReturn($constraint);
     $value->getValue()->willReturn('value');
     $comparison->getValue()->willReturn($value);
     $comparison->getField()->willReturn('foo');
     $comparison->getOperator()->willReturn('=');
     $constraint->eq()->willReturn($comparisonConstraint);
     $comparisonConstraint->field('o.foo')->willReturn($comparisonConstraint);
     $comparisonConstraint->literal('value')->shouldBeCalled()->willReturn($comparisonConstraint);
     $comparisonConstraint->end()->shouldBeCalled();
     $this->restrict($comparison, DataSourceInterface::CONDITION_OR);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function walkValue(Value $value)
 {
     $value->getValue();
 }
 /**
  * @inheritDoc
  */
 public function walkValue(Value $value)
 {
     if (is_object($value->getValue())) {
         $result = $this->dispatch($value->getValue());
     } else {
         $result = $value->getValue();
     }
     return $result;
 }
 /**
  * {@inheritDoc}
  */
 public function walkValue(Value $value)
 {
     return $this->doWalkValue($value->getValue());
 }
Exemplo n.º 5
0
 /**
  * {@inheritDoc}
  */
 public function walkValue(Value $value, OperandFactory $parentNode)
 {
     throw new \BadMethodCallException('What is this even used for?');
     return $parentNode->literal($value->getValue());
 }