Exemplo n.º 1
0
 /**
  * Test nameOfMessage method.
  */
 public function testNameOfMessage()
 {
     $this->given($cause = new \Exception('some cause'))->when($exception = NotFoundException::nameOfMessage('foo', $cause))->then()->object($exception)->isInstanceOf(NotFoundException::class)->integer($exception->getCode())->isEqualTo(0)->object($exception->getPrevious())->isIdenticalTo($cause);
 }
Exemplo n.º 2
0
 /**
  * @param MessageInterface $message
  *
  * @return NotFoundException
  */
 protected function notFoundException($message)
 {
     return NotFoundException::nameOfMessage($message);
 }