Beispiel #1
0
 /**
  * Test continue if url not crawlable
  *
  * @return void
  */
 public function testUrlNotCrawlable()
 {
     $client = $this->getMockClient()->makePartial();
     $domCrawler = $this->getMockDomCrawler()->makePartial();
     $crawl = new CrawlerUrl($client, $domCrawler);
     $this->assertEquals(false, $crawl->checkIfCrawlable('#'));
     $this->assertEquals(false, $crawl->checkIfCrawlable('#example'));
     $this->assertEquals(false, $crawl->checkIfCrawlable('javascript:void(0);'));
     $this->assertEquals(false, $crawl->checkIfCrawlable('javascript:executeSomeScripts();'));
     $this->assertEquals(false, $crawl->checkIfCrawlable(''));
 }