Esempio n. 1
0
 /**
  * Tests two false conditions.
  */
 public function testTwoFalseConditions()
 {
     // The method on the test condition must be called once.
     $this->falseConditionExpression->executeWithState(Argument::type(RulesStateInterface::class))->shouldBeCalledTimes(1);
     $this->and->addExpressionObject($this->falseConditionExpression->reveal())->addExpressionObject($this->falseConditionExpression->reveal());
     $this->assertFalse($this->and->execute(), 'Two false conditions return FALSE.');
 }
Esempio n. 2
0
 /**
  * Tests two false conditions.
  */
 public function testTwoFalseConditions()
 {
     $this->falseConditionExpression->executeWithState(Argument::type(ExecutionStateInterface::class))->shouldBeCalledTimes(1);
     $second_condition = $this->prophesize(ConditionExpressionInterface::class);
     $second_condition->getUuid()->willReturn('false_uuid2');
     $second_condition->executeWithState(Argument::type(ExecutionStateInterface::class))->willReturn(FALSE)->shouldBeCalledTimes(1);
     $this->or->addExpressionObject($this->falseConditionExpression->reveal())->addExpressionObject($second_condition->reveal());
     $this->assertFalse($this->or->execute(), 'Two false conditions return FALSE.');
 }