public function testOpenPullRequestAutoPushMissingBranch()
{
$command = new PullRequestCreateCommand();
$tester = $this->getCommandTester($command, null, null, function (HelperSet $helperSet) {
$helperSet->set($this->getLocalGitHelper('someone')->reveal());
$helperSet->set($this->getGitConfigHelper('someone')->reveal());
});
// use the default title
$this->setExpectedCommandInput($command, "\nMy description\n");
$tester->execute(['--template' => 'default', '--source-org' => 'someone'], ['interactive' => true]);
$display = $tester->getDisplay();
$this->assertCommandOutputMatches(['someone wants to merge 1 commit into gushphp/gush:master from someone:issue-145', 'Branch "issue-145" was pushed to "someone".', 'Opened pull request https://github.com/gushphp/gush/pull/' . TestAdapter::PULL_REQUEST_NUMBER], $display);
$this->assertNotContains('Do you want to push the branch now?', $display);
$pr = $command->getAdapter()->getPullRequest(TestAdapter::PULL_REQUEST_NUMBER);
$this->assertEquals('Some good title', $pr['title']);
}