public function testExecuteDBBackup() { $input = ['module' => ['Magento_A', 'Magento_B'], '--backup-db' => true]; $this->setUpExecute($input); $this->backupRollback->expects($this->once()) ->method('dbBackup') ->willReturn($this->backupRollback); $this->tester->execute($input); }
public function testExecuteDBBackup() { $input = ['module' => ['Magento_A', 'Magento_B'], '--backup-db' => true]; $this->setUpExecute(); $this->moduleUninstaller->expects($this->once())->method('uninstallCode')->with($this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $input['module']); $this->moduleRegistryUninstaller->expects($this->once())->method('removeModulesFromDb')->with($this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $input['module']); $this->moduleRegistryUninstaller->expects($this->once())->method('removeModulesFromDeploymentConfig')->with($this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $input['module']); $this->backupRollback->expects($this->once())->method('dbBackup')->willReturn($this->backupRollback); $this->tester->execute($input); }
public function testExecuteDBBackup() { $this->deploymentConfig->expects($this->once()) ->method('isAvailable') ->will($this->returnValue(true)); $this->backupRollback->expects($this->once()) ->method('dbBackup') ->willReturn($this->backupRollback); $this->tester->execute(['--db' => true]); }
public function testCreateAction() { $this->backupRollback->expects($this->once())->method('dbBackup')->willReturn('backup/path/'); $jsonModel = $this->controller->createAction(); $this->assertInstanceOf('Zend\\View\\Model\\JsonModel', $jsonModel); $variables = $jsonModel->getVariables(); $this->assertArrayHasKey('responseType', $variables); $this->assertEquals(ResponseTypeInterface::RESPONSE_TYPE_SUCCESS, $variables['responseType']); $this->assertArrayHasKey('files', $variables); $this->assertEquals(['backup/path/'], $variables['files']); }
public function testExecute() { $this->backupRollbackFactory->expects($this->once())->method('create')->willReturn($this->backupRollback); $this->backupRollback->expects($this->once())->method('dbRollback'); $this->jobDbRollback->execute(); }