/** * {@inheritdoc} */ public function resolve(Command $command) { return $this->handlerMap->getHandler(get_class($command)); }
/** * @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); }