public function testExecute()
 {
     $this->deployer->expects($this->once())->method('deploy');
     $this->objectManager->expects($this->at(0))->method('create')->willReturn($this->filesUtil);
     $this->objectManager->expects($this->at(1))->method('create')->willReturn($this->deployer);
     $this->validator->expects($this->once())->method('isValid')->with('en_US')->willReturn(true);
     $tester = new CommandTester($this->command);
     $tester->execute([]);
 }
 public function testExecuteValidateLanguages()
 {
     $this->filesUtil->expects(self::any())->method('getStaticPreProcessingFiles')->willReturn([]);
     $this->deployer->expects($this->once())->method('deploy');
     $this->objectManager->expects($this->at(0))->method('create')->willReturn($this->filesUtil);
     $this->objectManager->expects($this->at(1))->method('create')->willReturn($this->deployer);
     $this->validator->expects(self::exactly(2))->method('isValid')->willReturnMap([['en_US', true], ['uk_UA', true]]);
     $tester = new CommandTester($this->command);
     $tester->execute(['languages' => ['en_US', 'uk_UA']]);
 }
 /**
  * @param \Magento\Deploy\Model\Deployer $deployer
  * @param array $deployableLanguages
  * @param array $deployableAreaThemeMap
  * @return int
  */
 private function deploy($deployer, $deployableLanguages, $deployableAreaThemeMap)
 {
     return $deployer->deploy($this->objectManagerFactory, $deployableLanguages, $deployableAreaThemeMap);
 }