/** * @param BaseCommand $command * @param array $input * * @return CommandTester */ private function runCommandTest(BaseCommand $command, array $input = []) { $application = $this->getApplication(); $command->setApplication($application); $commandTest = new CommandTester($command); $commandTest->execute(array_merge($input, ['command' => $command->getName()]), ['decorated' => false]); return $commandTest; }
/** * @param BaseCommand $command * @param array $input * @param array $localConfig * @param \Closure|null $helperSetManipulator * * @return CommandTester */ private function runCommandTest(BaseCommand $command, array $input = [], array $localConfig = [], $helperSetManipulator = null) { $config = new Config('/home/user', '/temp/gush', ['adapters' => ['github' => ['authentication' => ['username' => 'cordoval', 'password' => 'very-un-secret']], 'github_enterprise' => ['authentication' => ['username' => 'admins', 'password' => 'very-un-secretly']]]], '/data/repo-dir', $localConfig); $application = $this->getApplication($config, $helperSetManipulator); $command->setApplication($application); $commandTest = new CommandTester($command); $commandTest->execute(array_merge($input, ['command' => $command->getName()]), ['decorated' => false]); return $commandTest; }