/** * Check failed event. * * @param \phpbu\App\Configuration\Backup\Check $check */ public function checkFailed(Configuration\Backup\Check $check) { $this->checksFailed++; $this->backupActive->fail(); $this->backupActive->checkFailed($check); $event = new Event\Check\Failed($check); $this->eventDispatcher->dispatch(Event\Check\Failed::NAME, $event); }
/** * Test Check handling. */ public function testCheck() { $check = new Configuration\Backup\Check('SizeMin', '10M'); $backup = new Backup('name'); $backup->checkAdd($check); $backup->checkFailed($check); $this->assertEquals(1, $backup->checkCountFailed()); $this->assertEquals(1, $backup->checkCount()); }