/** @return Resource */ public function get() { return $this->fetcher->get($this->href); }
function it_makes_a_request_to_the_link(ResourceFetcher $fetcher) { $resource = new Resource([]); $fetcher->get('test_href')->willReturn($resource); $this->get()->shouldReturn($resource); }
function let(ResourceFetcher $fetcher, FieldNode $f1, FieldNode $f2, ResourceNode $resource) { $this->link = new Link($fetcher->getWrappedObject(), 'href'); $this->beConstructedWith(['field1' => $f1->getWrappedObject(), 'field2' => $f2->getWrappedObject()], ['link1' => $this->link], ['resource1' => $resource->getWrappedObject()]); }