/**
     * @param array $expected
     *
     * @dataProvider indexActionDataProvider
     */
    public function testIndexAction($expected)
    {
        $this->sampleData->expects($this->once())->method('isDeployed')->willReturn($expected['isSampledataEnabled']);
        $this->sampleData->expects($this->once())->method('isInstalledSuccessfully')
            ->willReturn($expected['isSampleDataInstalled']);
        $this->sampleData->expects($this->once())->method('isInstallationError')
            ->willReturn($expected['isSampleDataErrorInstallation']);
        $this->lists->expects($this->once())->method('getTimezoneList')->willReturn($expected['timezone']);
        $this->lists->expects($this->once())->method('getCurrencyList')->willReturn($expected['currency']);
        $this->lists->expects($this->once())->method('getLocaleList')->willReturn($expected['language']);

        $viewModel = $this->controller->indexAction();

        $this->assertInstanceOf('Zend\View\Model\ViewModel', $viewModel);
        $this->assertTrue($viewModel->terminate());

        $variables = $viewModel->getVariables();
        $this->assertArrayHasKey('timezone', $variables);
        $this->assertArrayHasKey('currency', $variables);
        $this->assertArrayHasKey('language', $variables);
        $this->assertSame($expected, $variables);
    }
 /**
  * @param array $expected
  * @param $withSampleData
  *
  * @dataProvider indexActionDataProvider
  */
 public function testIndexAction($expected, $withSampleData)
 {
     if ($withSampleData) {
         $this->moduleList->expects($this->once())->method('has')->willReturn(true);
         $this->objectManager->expects($this->once())->method('get')->willReturn($this->sampleDataState);
         $this->sampleDataState->expects($this->once())->method('isInstalled')->willReturn($expected['isSampleDataInstalled']);
         $this->sampleDataState->expects($this->once())->method('hasError')->willReturn($expected['isSampleDataErrorInstallation']);
     } else {
         $this->moduleList->expects($this->once())->method('has')->willReturn(false);
         $this->objectManager->expects($this->never())->method('get');
     }
     $this->lists->expects($this->once())->method('getTimezoneList')->willReturn($expected['timezone']);
     $this->lists->expects($this->once())->method('getCurrencyList')->willReturn($expected['currency']);
     $this->lists->expects($this->once())->method('getLocaleList')->willReturn($expected['language']);
     $viewModel = $this->controller->indexAction();
     $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $viewModel);
     $this->assertTrue($viewModel->terminate());
     $variables = $viewModel->getVariables();
     $this->assertArrayHasKey('timezone', $variables);
     $this->assertArrayHasKey('currency', $variables);
     $this->assertArrayHasKey('language', $variables);
     $this->assertSame($expected, $variables);
 }
 /**
  * @param array $expected
  *
  * @dataProvider indexActionDataProvider
  */
 public function testIndexAction($expected)
 {
     $sampleData = $this->getMock('\\Magento\\Setup\\Model\\SampleData', [], [], '', false);
     $lists = $this->getMock('\\Magento\\Setup\\Model\\Lists', [], [], '', false);
     $controller = new CustomizeYourStore($lists, $sampleData);
     $sampleData->expects($this->once())->method('isDeployed')->willReturn($expected['isSampledataEnabled']);
     $lists->expects($this->once())->method('getTimezoneList')->willReturn($expected['timezone']);
     $lists->expects($this->once())->method('getCurrencyList')->willReturn($expected['currency']);
     $lists->expects($this->once())->method('getLocaleList')->willReturn($expected['language']);
     $viewModel = $controller->indexAction();
     $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $viewModel);
     $this->assertTrue($viewModel->terminate());
     $variables = $viewModel->getVariables();
     $this->assertArrayHasKey('timezone', $variables);
     $this->assertArrayHasKey('currency', $variables);
     $this->assertArrayHasKey('language', $variables);
     $this->assertSame($expected, $variables);
 }