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());
 }
Esempio n. 2
0
 /**
  * @dataProvider getTestParseData
  */
 public function testParse($linkHeader, array $expectedLinks)
 {
     $parser = new LinkParser();
     $links = $parser->parseLinkHeader($linkHeader);
     $this->assertSame($expectedLinks, $links);
 }