public function theResponseShouldContain($str)
{
if (!$this->responseIsJson) {
if (strpos($this->responseData, $str) === false) {
throw new \Exception(sprintf('String "%s" not found.', $str));
}
} else {
throw new \Exception('Response should not be a JSON message.');
}
}