/** * {@inheritdoc} */ public function match(Command $command) : CommandHandler { return $this->commandMap->getHandler(get_class($command)); }
/** * @expectedException \Novuso\System\Exception\LookupException */ public function test_that_command_map_throws_exception_when_handler_is_not_registered() { $this->commandMap->getHandler(RegisterUserCommand::class); }