public function testProgressAction()
 {
     $viewModel = $this->controller->progressAction();
     $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $viewModel);
     $this->assertTrue($viewModel->terminate());
     $this->assertSame('/magento/setup/complete-backup/progress.phtml', $viewModel->getTemplate());
 }
 public function testIndexActionWithExceptions()
 {
     $this->maintenanceMode->expects($this->once())->method('set')->will($this->throwException(new \Exception("Test error message")));
     $jsonModel = $this->controller->indexAction();
     $this->assertInstanceOf('Zend\\View\\Model\\JsonModel', $jsonModel);
     $variables = $jsonModel->getVariables();
     $this->assertArrayHasKey('responseType', $variables);
     $this->assertEquals(ResponseTypeInterface::RESPONSE_TYPE_ERROR, $variables['responseType']);
     $this->assertArrayHasKey('error', $variables);
     $this->assertEquals("Test error message", $variables['error']);
 }