public function testWillUseCorrectImageIdentifierFromRequestWhenCreatingError()
{
$exception = new RuntimeException('You wronged', 400);
$exception->setImboErrorCode(123);
$request = $this->getMock('Imbo\\Http\\Request\\Request');
$request->expects($this->once())->method('getImage')->will($this->returnValue(null));
$request->expects($this->once())->method('getImageIdentifier')->will($this->returnValue('imageIdentifier'));
$model = Error::createFromException($exception, $request);
$this->assertSame(123, $model->getImboErrorCode());
$this->assertSame('imageIdentifier', $model->getImageIdentifier());
}