Example #1
0
 public function testGetNonExistingTransitions()
 {
     $this->setExpectedException(Error::CLASS, 'No transitions available at state "non_existant".');
     $states = ['state1' => new State('state1', StateInterface::TYPE_INITIAL), 'state2' => new State('state2', StateInterface::TYPE_FINAL)];
     $transitions = ['state1' => ['promote' => [new Transition('state1', 'state2')]]];
     $subject = new GenericSubject('test_machine', 'state1');
     $state_machine = new StateMachine('test_machine', $states, $transitions);
     $state_machine->getTransitions('non_existant');
 }