public function testDoNotAddEntryToPhiveXml()
 {
     $config = $this->getCommandConfigMock();
     $pharService = $this->getPharServiceMock();
     $phiveXmlConfig = $this->getPhiveXmlConfigMock();
     $requestedPhar = $this->getRequestedPharMock();
     $config->expects($this->once())->method('getRequestedPhars')->will($this->returnValue([$requestedPhar]));
     $config->expects($this->once())->method('doNotAddToPhiveXml')->willReturn(true);
     $phiveXmlConfig->expects($this->never())->method('addPhar');
     $command = new InstallCommand($config, $pharService, $phiveXmlConfig, $this->getEnvironmentMock());
     $command->execute();
 }
Beispiel #2
0
 public function error($message, $exit = false)
 {
     $this->cmd->info("{$message}");
     if ($exit) {
         exit;
     }
 }
 /**
  * @param InstallCommand $command
  * @return array
  */
 public function getSampleDataPackages(InstallCommand $command)
 {
     $commandClass = self::COMMAND_CLASS;
     $commandConfig = $command->getCommandConfig($commandClass);
     return $commandConfig['demo-data-packages'];
 }