예제 #1
0
 /**
  * @param StateMachineInterface $stateMachine
  * @param string $transition
  */
 private function applyTransition(StateMachineInterface $stateMachine, $transition)
 {
     if ($stateMachine->can($transition)) {
         $stateMachine->apply($transition);
     }
 }
예제 #2
0
 function it_provide_sm_can_function(FactoryInterface $factory, StateMachineInterface $stateMachine)
 {
     $this->can($object = new DummyObject(), 'new', 'simple');
     $factory->get($object, 'simple')->shouldHaveBeenCalled();
     $stateMachine->can('new')->shouldHaveBeenCalled();
 }