Exemple #1
0
 /**
  * Crypt failed event.
  *
  * @param \phpbu\App\Configuration\Backup\Crypt $crypt
  */
 public function cryptFailed(Configuration\Backup\Crypt $crypt)
 {
     $this->cryptsFailed++;
     $this->backupActive->fail();
     $this->backupActive->cryptFailed($crypt);
     $event = new Event\Crypt\Failed($crypt);
     $this->eventDispatcher->dispatch(Event\Crypt\Failed::NAME, $event);
 }
Exemple #2
0
 /**
  * Test Crypt handling.
  */
 public function testCrypt()
 {
     $crypt = new Configuration\Backup\Crypt('mcrypt', false);
     $backup = new Backup('name');
     $backup->cryptAdd($crypt);
     $backup->cryptFailed($crypt);
     $backup->cryptSkipped($crypt);
     $this->assertEquals(1, $backup->cryptCountFailed(), 'failed');
     $this->assertEquals(1, $backup->cryptCountSkipped(), 'skipped');
     $this->assertEquals(1, $backup->cryptCount(), 'executed');
 }