예제 #1
0
 public function __invoke(Event $event, Stateful $object, Context $context, Input $input, State $nextState)
 {
     /*
      * We only care that the same context was passed to each event, so we'll
      * keep track of it here for asserting in our tests.
      */
     if (!$this->context) {
         $this->context = $context;
     }
     $this->append([$event->getName(), $object, $context, $input, $nextState]);
 }
 public function addToEventsTriggered(Event $event, $params = [])
 {
     $this->eventsTriggered[$event->getName()][] = ['event' => $event, 'params' => $params];
 }