Esempio n. 1
0
 protected function setUp()
 {
     $file = FileLoader::loadFile();
     $this->json = (string) trim(file_get_contents($file));
     $halJsonReader = new HalJsonReader();
     $this->resource = new Resource($halJsonReader->execute($this->json));
 }
Esempio n. 2
0
 public function __construct(HttpClient $client, HttpResponse $response)
 {
     $halJsonReader = new JsonReader();
     $this->content = new Resource($halJsonReader->execute($response->getBody()));
 }