Gush\Tests\Helper\GitHelperTest::merges_remote_branch_fast_forward_in_clean_wc PHP Method

merges_remote_branch_fast_forward_in_clean_wc() public method

    public function merges_remote_branch_fast_forward_in_clean_wc()
    {
        $base = 'master';
        $sourceBranch = 'amazing-feature';
        $hash = '8ae59958a2632018275b8db9590e9a79331030cb';
        $processHelper = $this->prophesize(ProcessHelper::class);
        $this->unitGit = new GitHelper($processHelper->reveal(), $this->gitConfigHelper->reveal(), $this->filesystemHelper->reveal());
        $processHelper->runCommand('git status --porcelain --untracked-files=no')->willReturn("\n");
        $processHelper->runCommand('git rev-parse --abbrev-ref HEAD')->willReturn('master');
        $processHelper->runCommand(['git', 'checkout', 'master'])->shouldBeCalled();
        $processHelper->runCommand(['git', 'merge', '--ff', 'amazing-feature'])->shouldBeCalled();
        $processHelper->runCommand('git rev-parse HEAD')->willReturn($hash);
        $this->assertSame($hash, $this->unitGit->mergeBranch($base, $sourceBranch, null, true));
    }