diff --git a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php index 6999f0cb166..3a6793dbc9b 100644 --- a/tests/TestCase/TestSuite/IntegrationTestCaseTest.php +++ b/tests/TestCase/TestSuite/IntegrationTestCaseTest.php @@ -778,9 +778,7 @@ public function testContentTypeInAction() public function testAssertResponseContains() { $this->_response = new Response(); - $body = $this->_response->getBody(); - $body->write('Some content'); - $this->_response = $this->_response->withBody($body); + $this->_response = $this->_response->withStringBody('Some content');; $this->assertResponseContains('content'); } @@ -793,9 +791,7 @@ public function testAssertResponseContains() public function testAssertResponseNotContains() { $this->_response = new Response(); - $body = $this->_response->getBody(); - $body->write('Some content'); - $this->_response = $this->_response->withBody($body); + $this->_response = $this->_response->withStringBody('Some content'); $this->assertResponseNotContains('contents'); } @@ -808,9 +804,7 @@ public function testAssertResponseNotContains() public function testAssertResponseRegExp() { $this->_response = new Response(); - $body = $this->_response->getBody(); - $body->write('Some content'); - $this->_response = $this->_response->withBody($body); + $this->_response = $this->_response->withStringBody('Some content'); $this->assertResponseRegExp('/cont/'); } @@ -835,9 +829,7 @@ public function testAssertResponseRegExpNoResponse() public function testAssertResponseNotRegExp() { $this->_response = new Response(); - $body = $this->_response->getBody(); - $body->write('Some content'); - $this->_response = $this->_response->withBody($body); + $this->_response = $this->_response->withStringBody('Some content'); $this->assertResponseNotRegExp('/cant/'); }