protected function getContentFromResponse(JsonResponse $response) { return json_decode($response->getContent(), true); }
/** * Make an API response from an existing JSON response. * * @param \Illuminate\Http\JsonResponse $json * * @return \Dingo\Api\Http\Response */ public static function makeFromJson(JsonResponse $json) { $new = static::create(json_decode($json->getContent(), true), $json->getStatusCode()); $new->headers = $json->headers; return $new; }
/** * @depends testUploadSingleFile */ public function testReturnUrlToUploadedFile(JsonResponse $response) { $this->assertJson($response->getContent()); $this->assertContains('urls', $response->getContent()); }