/**
  *
  */
 public function testCountryCodeExtractionNegative()
 {
     $conf = new AppConf();
     $html = SourceLoad::open(new URL(AppConf::ZEND_SITE_URL));
     $zendCountries = new ZendCountries($html, $conf);
     $zendCountries->extract();
     $data = $zendCountries->getData();
     $this->assertNotEmpty($data);
     $this->assertArrayNotHasKey("Manchester", $data);
 }
 /**
  * Test dependancy
  */
 public function testCountriesAreLoadedFromDisk()
 {
     $conf = new AppConf();
     if (!file_exists($conf->getLocalCopySite())) {
         $html = SourceLoad::open(new URL(AppConf::ZEND_SITE_URL));
         SourceStore::save($conf->getLocalCopySite(), $html);
     }
     $htmlLoc = SourceLoad::open(new File($conf->getLocalCopySite()));
     $this->assertInstanceOf("ZendDirectoryInfo\\Source\\HtmlSource", $htmlLoc);
     $html = SourceLoad::open(new URL(AppConf::ZEND_SITE_URL));
     $zendCountries = new ZendCountries($html, $conf);
     $zendCountries->extract();
     $this->assertNotEmpty($zendCountries);
     $data = $zendCountries->getData();
     $this->assertArrayHasKey("Malta", $data);
     $this->assertEquals(135, $data["Malta"]);
 }