/** * @Given /^the response should be "([^"]*)"$/ * @param string $string * @return void * @throws \Exception */ public function theResponseShouldBe($string) { $data = $this->response->getBody(true); if ($string != $data) { throw new \Exception(sprintf("Unexpected response.\nExpected response:%s\nActual response:\n%s" . $string, $data)); } }