canInvoke() 공개 메소드

public canInvoke ( mixed $handler, mixed $message ) : boolean
$handler mixed
$message mixed
리턴 boolean
 /**
  * @test
  */
 public function it_invokes_the_handle_command_method_of_the_handler_without_command_name()
 {
     $handleCommandStrategy = new HandleCommandStrategy();
     $doSomething = new CustomMessage("I am a command");
     $handleCommandHandler = new CustomMessageCommandHandler();
     $this->assertTrue($handleCommandStrategy->canInvoke($handleCommandHandler, $doSomething));
     $handleCommandStrategy->invoke($handleCommandHandler, $doSomething);
     $this->assertSame($doSomething, $handleCommandHandler->getLastMessage());
 }