/**
  * @ControllerManaged
  */
 protected function scheduleBackup()
 {
     $statusContainer = $this->backupService->createStatusInformation();
     if ($statusContainer->getOverallStatus() == StatusContainer::ERROR) {
         throw new EasyBackupException($this->trans->t('Not all preconditions are met, backup cannot be scheduled'));
     }
     $this->backupService->executeBackup();
 }
 public function testExecuteBackupAlreadyRunning()
 {
     $testFile = '/tmp/phptest';
     file_put_contents($testFile, 'Test');
     $this->configServiceMock->expects($this->atLeastOnce())->method('getLogfileName')->will($this->returnValue($testFile));
     $this->cut->executeBackup();
     unlink($testFile);
 }