예제 #1
0
 protected function getContentFromResponse(JsonResponse $response)
 {
     return json_decode($response->getContent(), true);
 }
예제 #2
0
 /**
  * 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;
 }
예제 #3
0
 /**
  * @depends testUploadSingleFile
  */
 public function testReturnUrlToUploadedFile(JsonResponse $response)
 {
     $this->assertJson($response->getContent());
     $this->assertContains('urls', $response->getContent());
 }