/** * Cleanup skipped event. * * @param \phpbu\App\Configuration\Backup\Cleanup $cleanup */ public function cleanupSkipped(Configuration\Backup\Cleanup $cleanup) { $this->cleanupsSkipped++; $this->backupActive->cleanupSkipped($cleanup); $event = new Event\Cleanup\Skipped($cleanup); $this->eventDispatcher->dispatch(Event\Cleanup\Skipped::NAME, $event); }
/** * 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()); }