Ejemplo n.º 1
0
 /**
  * Helper function to handle a state method.
  *
  * @param string $handle
  * @param array $args
  *
  * @return mixed|void
  */
 public function handle($handle, $args = [])
 {
     return $this->machine->handle($handle, $args);
 }
Ejemplo n.º 2
0
 function it_should_call_a_handler(Machine $machine)
 {
     $machine->handle('handler', ['arg1' => 'argVal'])->shouldBeCalled()->willReturn("it worked");
     $this->setMachine($machine);
     $this->handle('handler', ['arg1' => 'argVal'])->shouldReturn("it worked");
 }
Ejemplo n.º 3
0
 /**
  * @Given /^I run handle (.*)$/
  */
 public function iRunHandle($handle)
 {
     $this->fsm->handle($handle);
 }