Beispiel #1
0
 /**
  * Test continue if return Guzzle\Psr7\Response object
  *
  * @return void
  */
 public function testGetEffectiveUrl()
 {
     $client = $this->getMockClient()->makePartial();
     $domCrawler = $this->getMockDomCrawler()->makePartial();
     $response = Mockery::mock('GuzzleHttp\\Psr7\\Response');
     $client->shouldReceive('get')->andReturn($response);
     $crawl = new CrawlerUrl($client, $domCrawler);
     $result = $crawl->getEffectiveUrl('http://example.com');
     $this->assertInstanceOf(Response::class, $result);
 }