Ejemplo n.º 1
0
 /**
  * Test Cleanup handling.
  */
 public function testCleanup()
 {
     $cleanup = new Configuration\Backup\Cleanup('capacity', false);
     $backup = new Backup('name');
     $backup->cleanupAdd($cleanup);
     $backup->cleanupFailed($cleanup);
     $backup->cleanupSkipped($cleanup);
     $this->assertEquals(1, $backup->cleanupCountFailed());
     $this->assertEquals(1, $backup->cleanupCountSkipped());
     $this->assertEquals(1, $backup->cleanupCount());
 }
Ejemplo n.º 2
0
 /**
  * Cleanup start event.
  *
  * @param \phpbu\App\Configuration\Backup\Cleanup $cleanup
  */
 public function cleanupStart(Configuration\Backup\Cleanup $cleanup)
 {
     $this->backupActive->cleanupAdd($cleanup);
     $event = new Event\Cleanup\Start($cleanup);
     $this->eventDispatcher->dispatch(Event\Cleanup\Start::NAME, $event);
 }