protected function apiShouldReturnError($statusCode, $error) { assertThat($this->response->hasSucceed(), is(false)); assertThat($this->response->statusCode, is($statusCode)); assertThat($this->response->json['errors'][0], identicalTo($error)); }