Gush\Tests\Command\Branch\BranchDeleteCommandTest::getLocalGitHelper PHP Method

getLocalGitHelper() private method

private getLocalGitHelper ( $branchName = 'branch-name', $deletedBranch = null, $pushed = true, $remote = 'cordoval' )
    private function getLocalGitHelper($branchName = 'branch-name', $deletedBranch = null, $pushed = true, $remote = 'cordoval')
    {
        if (!$deletedBranch) {
            $deletedBranch = $branchName;
        }
        $helper = $this->getGitHelper(true);
        $helper->getActiveBranchName()->willReturn($branchName);
        if ($pushed) {
            $helper->pushToRemote($remote, ':' . $deletedBranch, true)->shouldBeCalled();
        } else {
            $helper->pushToRemote($remote, ':' . $deletedBranch, true)->shouldNotBeCalled();
        }
        return $helper;
    }