/** * @return $this */ public function execute() { if (!$this->databaseConfig->isAutoUpdate()) { return $this; } try { $this->updaterSelected->update(); } catch (\Exception $e) { $this->logger->critical($e); } return $this; }
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()); }