Exemple #1
0
 public function testExecutePreConditionsAreNotMet()
 {
     $context = [];
     $conditionConfiguration = ['test' => []];
     $condition = $this->getMockBuilder('Oro\\Bundle\\WorkflowBundle\\Model\\Condition\\Configurable')->disableOriginalConstructor()->getMock();
     $condition->expects($this->any())->method('evaluate')->with($context)->will($this->returnValue(false));
     $this->processDefinition->expects($this->once())->method('getPreConditionsConfiguration')->will($this->returnValue($conditionConfiguration));
     $this->conditionFactory->expects($this->once())->method('create')->with(ConfigurableCondition::ALIAS, $conditionConfiguration)->will($this->returnValue($condition));
     $this->processDefinition->expects($this->never())->method('getActionsConfiguration');
     $this->actionAssembler->expects($this->never())->method('assemble');
     $this->process->execute($context);
 }