Skip to content

Commit

Permalink
Change body write to withStringBody()
Browse files Browse the repository at this point in the history
  • Loading branch information
Iandenh committed Jun 14, 2017
1 parent d8b4e0e commit b438651
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/TestCase/TestSuite/IntegrationTestCaseTest.php
Expand Up @@ -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');
}
Expand All @@ -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');
}
Expand All @@ -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/');
}
Expand All @@ -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/');
}
Expand Down

0 comments on commit b438651

Please sign in to comment.