/** * @param $event * @param array $args */ public function fire($event, $args = []) { $this->machine->fire($event, $args); }
function it_should_fire_events(Machine $machine) { $machine->fire('event', [])->shouldBeCalled(); $this->setMachine($machine); $this->fire('event'); }
/** * @When /^An event (.*) is fired$/ */ public function anEventIsFired($event) { $this->fsm->fire($event, []); }