Exemple #1
0
 /**
  * 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);
 }
Exemple #2
0
 /**
  * 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());
 }