Esempio n. 1
0
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     $result = $this->geoIPUpdater->update();
     if (!$result) {
         $this->error('Update failed!');
         return;
     }
     $this->info('New update file (' . $result . ') installed.');
 }
Esempio n. 2
0
 public function test_maxmind_updater_dir_not_exist()
 {
     $database = __DIR__ . '/data/new_dir/GeoLite2-City.mmdb';
     $config = ['driver' => 'maxmind', 'maxmind' => ['database' => $database]];
     $geoipUpdater = new GeoIPUpdater($config);
     $this->assertEquals($geoipUpdater->update(), $database);
     unlink($database);
     rmdir(pathinfo($database, PATHINFO_DIRNAME));
 }