Пример #1
0
 /**
  * @return $this
  */
 public function execute()
 {
     if (!$this->databaseConfig->isAutoUpdate()) {
         return $this;
     }
     try {
         $this->updaterSelected->update();
     } catch (\Exception $e) {
         $this->logger->critical($e);
     }
     return $this;
 }
Пример #2
0
 public function testIsAutoUpdate()
 {
     $isAutoUpdate = true;
     $this->scopeConfig->expects($this->once())->method('isSetFlag')->with('tobai_geoip2/database/auto_update')->willReturn($isAutoUpdate);
     $this->assertEquals($isAutoUpdate, $this->config->isAutoUpdate());
 }