diff --git a/src/TestSuite/IntegrationTestCase.php b/src/TestSuite/IntegrationTestCase.php index 90cfc03673f..5b4d58e5c50 100644 --- a/src/TestSuite/IntegrationTestCase.php +++ b/src/TestSuite/IntegrationTestCase.php @@ -454,7 +454,8 @@ public function assertRedirect($url = null, $message = '') } $result = $this->_response->header(); if ($url === null) { - return $this->assertNotEmpty($result['Location']); + $this->assertTrue(!empty($result['Location']), $message); + return; } if (empty($result['Location'])) { $this->fail('No location header set. ' . $message);