/** * Execute the console command. * * @return mixed */ public function handle() { if (is_string($this->argument('url'))) { $url = $this->argument('url'); $crawlCommand = new CrawlerUrl($this->client, $this->crawler); $crawlCommand->setBaseUrl($url); $crawlCommand->start(); } }
/** * Test continue if return null * * @return void */ public function testDoRequestWithImgContentType() { $client = new Client(); $domCrawler = $this->getMockDomCrawler()->makePartial(); $crawl = new CrawlerUrl($client, $domCrawler); $result = $crawl->doRequest('https://www.google.co.id/images/branding/product/ico/googleg_lodp.ico'); $this->assertNull($result); }