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)); }
public function __construct(HttpClient $client, HttpResponse $response) { $halJsonReader = new JsonReader(); $this->content = new Resource($halJsonReader->execute($response->getBody())); }