Exemple #1
0
 /**
  * Perform an update.
  *
  * If enabled (default) this method will send a E_USER_NOTICE about the update.
  *
  * @see setNotice()
  */
 public function perform(DataBackend $backend)
 {
     $isNotice = $this->notice;
     $lock = new Lock(self::UPDATE_LOCK);
     $lock->nonblockingExecuteOnce(function () use($backend, $isNotice) {
         $backend->update();
         if ($isNotice) {
             trigger_error("bav's bank data was updated sucessfully.", E_USER_NOTICE);
         }
     });
 }
Exemple #2
0
 /**
  * @dataProvider provideInstallationBackends
  */
 public function testLastUpdate(DataBackend $backend)
 {
     $now = time();
     $backend->install();
     $update = $backend->getLastUpdate();
     $this->assertGreaterThanOrEqual($now, $update);
     $now = time();
     $backend->update();
     $update = $backend->getLastUpdate();
     $this->assertGreaterThanOrEqual($now, $update);
     $backend->uninstall();
 }