public function testRunCommandWithNoConfiguredAdapter()
{
$command = new InitCommand();
$tester = $this->getCommandTester($command, [], []);
// adapter, issue-tracker, org, repo, issue-org, issue-project, confirm configure, select 0 (nothing)
$helper = $command->getHelper('gush_question');
$helper->setInputStream($this->getInputStream("0\n0\nMyOrg\nMyRepo\nIOrg\nIRepo\nyes\n0\n"));
$tester->execute();
$display = $tester->getDisplay(true);
$this->assertCommandOutputMatches(['Choose repository-manager', '[0] GitHub', '[1] GitHub Enterprise', 'Choose issue-tracker', 'Specify the repository organization name', 'Specify the repository name', 'Specify the issue-tracker organization name', 'Specify the issue-tracker repository/project name', 'Repository-manager "GitHub" is not configured yet.', 'Issue-tracker "GitHub" is not configured yet.', 'Would you like to configure the missing adapters now?', ['\\[OK\\]\\sConfiguration file saved successfully\\.$', true]], $display);
$expected = ['repo_adapter' => 'github', 'issue_tracker' => 'github', 'repo_org' => 'MyOrg', 'repo_name' => 'MyRepo', 'issue_project_org' => 'IOrg', 'issue_project_name' => 'IRepo'];
$this->assertFileExists($command->getConfig()->get('local_config'));
$this->assertEquals($expected, $command->getConfig()->toArray(Config::CONFIG_LOCAL));
}