diff --git a/tests/TestCase/Error/ExceptionRendererTest.php b/tests/TestCase/Error/ExceptionRendererTest.php index 28088c26833..5860fcb2268 100644 --- a/tests/TestCase/Error/ExceptionRendererTest.php +++ b/tests/TestCase/Error/ExceptionRendererTest.php @@ -437,16 +437,13 @@ public function testError400AsJson() $ExceptionRenderer->controller->response->expects($this->once())->method('statusCode')->with(404); $result = $ExceptionRenderer->render()->body(); + $expected = [ + 'message' => 'Custom message', + 'url' => '/posts/view/1000?sort=title&direction=desc', + 'code' => 404 + ]; - $expected = <<assertTextEquals($expected, $result); + $this->assertEquals($expected, json_decode($result, true)); } /**