Gush\Tests\Command\PullRequest\PullRequestMergeCommandTest::testMergePullRequestWithSwitchBase PHP Метод

testMergePullRequestWithSwitchBase() публичный Метод

    public function testMergePullRequestWithSwitchBase()
    {
        $command = new PullRequestMergeCommand();
        $tester = $this->getCommandTester($command, null, null, function (HelperSet $helperSet) {
            $helperSet->set($this->getLocalGitHelper(sprintf($this->mergeMessageSwitchBase, 'merge', 10, 'develop'), false, false, 'develop')->reveal());
        });
        $tester->execute(['pr_number' => 10, '--switch' => 'develop', 'pr_type' => 'merge'], ['interactive' => false]);
        $display = $tester->getDisplay();
        $this->assertCommandOutputMatches([sprintf(self::COMMAND_SWITCH_BASE_TARGET, 'gushphp', 'develop', 'base_ref'), sprintf(self::COMMAND_SWITCH_BASE, 'develop')], $display);
        $this->assertSame(sprintf(self::MERGE_NOTE_SWITCHED_BASE_AND_CLOSED, 'base_ref', 'develop', self::MERGE_HASH), $command->getAdapter()->getComments(2)['body']);
    }