/**
  * @param array $extensions
  * @dataProvider dataProviderForTestExtensionsAction
  * @covers \Magento\Setup\Controller\InstallExtensionGrid::extensionsAction
  */
 public function testExtensionsAction($extensions)
 {
     $this->packagesData->expects($this->once())->method('getPackagesForInstall')->will($this->returnValue($extensions));
     $jsonModel = $this->controller->extensionsAction();
     $this->assertInstanceOf('\\Zend\\View\\Model\\JsonModel', $jsonModel);
     $variables = $jsonModel->getVariables();
     $this->assertArrayHasKey('success', $variables);
     $this->assertArrayHasKey('extensions', $variables);
     $this->assertArrayHasKey('total', $variables);
     $this->assertTrue($variables['success']);
 }
 public function testSyncAction()
 {
     $this->packagesData->expects($this->once())->method('syncPackagesData')->willReturn($this->lastSyncData);
     $jsonModel = $this->controller->syncAction();
     $this->assertInstanceOf('Zend\\View\\Model\\JsonModel', $jsonModel);
     $variables = $jsonModel->getVariables();
     $this->assertArrayHasKey('success', $variables);
     $this->assertTrue($variables['success']);
     $this->assertEquals($this->lastSyncData, $variables['lastSyncData']);
 }