protected function process() { parent::process(); $response = $this->request->getResponse(); $links = []; if ($response->hasHeader('Link')) { $linkParser = new LinkParser(); $links = $linkParser->parseLinkHeader($response->getHeader('Link')); } $this->result = new Collection($this->result, $links, $this->getClient()); }
/** * @dataProvider getTestParseData */ public function testParse($linkHeader, array $expectedLinks) { $parser = new LinkParser(); $links = $parser->parseLinkHeader($linkHeader); $this->assertSame($expectedLinks, $links); }