Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function locate($nameOfMessage)
 {
     if (!$this->handlers->containsKey($nameOfMessage)) {
         throw NotFoundException::handlerFor($nameOfMessage);
     }
     return $this->handlers->get($nameOfMessage);
 }
Exemplo n.º 2
0
 /**
  * Test handlerFor method.
  */
 public function testHandlerFor()
 {
     $this->given($exception = NotFoundException::handlerFor('bar'))->then()->variable($exception->getPrevious())->isNull();
 }