$value ) );
?>
Incoming nodes: 1
Outgoing nodes: 1
protected function setUpWorkflowWithFinalActivitiesAfterCancellation() { $this->workflow = new ezcWorkflow('WorkflowWithFinalActivitiesAfterCancellation'); $cancelNode = new ezcWorkflowNodeCancel(); $this->workflow->startNode->addOutNode($cancelNode); $this->workflow->endNode->addInNode($cancelNode); $set = new ezcWorkflowNodeVariableSet(array('finalActivityExecuted' => true)); $set->addOutNode(new ezcWorkflowNodeEnd()); $this->workflow->finallyNode->addOutNode($set); }
public function testVerifyTooManyOutgoingNodes() { $a = new ezcWorkflowNodeVariableSet(array('foo' => 'bar')); $b = new ezcWorkflowNodeVariableSet(array('foo' => 'bar')); $c = new ezcWorkflowNodeVariableSet(array('foo' => 'bar')); $d = new ezcWorkflowNodeVariableSet(array('foo' => 'bar')); $b->addOutNode($c); $b->addOutNode($d); $b->addInNode($a); try { $b->verify(); } catch (ezcWorkflowInvalidWorkflowException $e) { $this->assertEquals('Node of type "VariableSet" has more outgoing nodes than allowed.', $e->getMessage()); return; } $this->fail('Expected an ezcWorkflowInvalidWorkflowException to be thrown.'); }