Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function resolve(Command $command)
 {
     return $this->handlerMap->getHandler(get_class($command));
 }
Esempio n. 2
0
 /**
  * @expectedException Novuso\Common\Application\Messaging\Command\Exception\HandlerNotFoundException
  */
 public function test_that_get_handler_throws_exception_for_undefined_command_class()
 {
     $commandMap = new CommandMemoryMap();
     $commandMap->getHandler(CreateTaskCommand::class);
 }