Пример #1
0
 /**
  * Sync failed event.
  *
  * @param \phpbu\App\Configuration\Backup\Sync $sync
  */
 public function syncFailed(Configuration\Backup\Sync $sync)
 {
     $this->syncsFailed++;
     $this->backupActive->syncFailed($sync);
     $event = new Event\Sync\Failed($sync);
     $this->eventDispatcher->dispatch(Event\Sync\Failed::NAME, $event);
 }
Пример #2
0
 /**
  * Test Sync handling.
  */
 public function testSync()
 {
     $sync = new Configuration\Backup\Sync('rsync', false);
     $backup = new Backup('name');
     $backup->syncAdd($sync);
     $backup->syncFailed($sync);
     $backup->syncSkipped($sync);
     $this->assertEquals(1, $backup->syncCountFailed());
     $this->assertEquals(1, $backup->syncCountSkipped());
     $this->assertEquals(1, $backup->syncCount());
 }