ImboUnitTest\Model\ErrorTest::testCanCreateAnErrorBasedOnAnException PHP Метод

testCanCreateAnErrorBasedOnAnException() публичный Метод

    public function testCanCreateAnErrorBasedOnAnException()
    {
        $request = $this->getMock('Imbo\\Http\\Request\\Request');
        $exception = new RuntimeException('You wronged', 400);
        $model = Error::createFromException($exception, $request);
        $this->assertSame(400, $model->getHttpCode());
        $this->assertSame('You wronged', $model->getErrorMessage());
        $this->assertNull($model->getImageIdentifier());
        $this->assertSame(Exception::ERR_UNSPECIFIED, $model->getImboErrorCode());
    }