コード例 #1
0
ファイル: State.php プロジェクト: daveawb/understated
 /**
  * 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);
 }
コード例 #2
0
ファイル: StateSpec.php プロジェクト: daveawb/understated
 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");
 }
コード例 #3
0
 /**
  * @Given /^I run handle (.*)$/
  */
 public function iRunHandle($handle)
 {
     $this->fsm->handle($handle);
 }