|
|
@@ -430,6 +430,7 @@ class ExceptionRendererTest extends TestCase
|
|
|
Router::setRequestInfo($request);
|
|
|
|
|
|
$exception = new NotFoundException('Custom message');
|
|
|
+ $execptionLine = __LINE__ - 1;
|
|
|
$ExceptionRenderer = new ExceptionRenderer($exception);
|
|
|
$ExceptionRenderer->controller->response = $this->getMockBuilder('Cake\Network\Response')
|
|
|
->setMethods(['statusCode', '_sendHeader'])
|
|
|
@@ -440,7 +441,9 @@ class ExceptionRendererTest extends TestCase
|
|
|
$expected = [
|
|
|
'message' => 'Custom message',
|
|
|
'url' => '/posts/view/1000?sort=title&direction=desc',
|
|
|
- 'code' => 404
|
|
|
+ 'code' => 404,
|
|
|
+ 'file' => __FILE__,
|
|
|
+ 'line' => $execptionLine
|
|
|
];
|
|
|
|
|
|
$this->assertEquals($expected, json_decode($result, true));
|