Skip to content

Commit

Permalink
Add assertResponseNotContains
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Jan 2, 2015
1 parent 232abb7 commit fca897f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/TestSuite/IntegrationTestCase.php
Expand Up @@ -534,6 +534,21 @@ public function assertResponseContains($content, $message = '')
$this->assertContains($content, $this->_response->body(), $message);
}

/**
* Asserts content does not exist in the response body.
*
* @param string $content The content to check for.
* @param string $message The failure message that will be appended to the generated message.
* @return void
*/
public function assertResponseNotContains($content, $message = '')
{
if (!$this->_response) {
$this->fail('No response set, cannot assert content. ' . $message);
}
$this->assertNotContains($content, $this->_response->body(), $message);
}

/**
* Asserts that the search string was in the template name.
*
Expand Down

0 comments on commit fca897f

Please sign in to comment.