diff --git a/src/TestSuite/IntegrationTestCase.php b/src/TestSuite/IntegrationTestCase.php index 73a0660807e..aaa3029a117 100644 --- a/src/TestSuite/IntegrationTestCase.php +++ b/src/TestSuite/IntegrationTestCase.php @@ -916,7 +916,7 @@ public function assertResponseEquals($content, $message = '') * @param bool $ignoreCase A flag to check whether we should ignore case or not. * @return void */ - public function assertResponseContains($content, $ignoreCase = false, $message = '') + public function assertResponseContains($content, $message = '', $ignoreCase = false) { if (!$this->_response) { $this->fail('No response set, cannot assert content. ' . $message); diff --git a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php index 7394bb53769..4921840b776 100644 --- a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php +++ b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php @@ -837,7 +837,7 @@ public function testAssertResponseContainsWithIgnoreCaseFlag() $this->_response = new Response(); $this->_response = $this->_response->withStringBody('Some content'); - $this->assertResponseContains('some', true); + $this->assertResponseContains('some', 'Failed asserting that the body contains given content', true); } /**