Gush\Tests\BaseTestCase::getGitConfigHelper PHP Метод

getGitConfigHelper() защищенный Метод

protected getGitConfigHelper ( ) : Prophecy\Prophecy\ObjectProphecy
Результат Prophecy\Prophecy\ObjectProphecy
    protected function getGitConfigHelper()
    {
        $helper = $this->prophesize(GitConfigHelper::class);
        $helper->setHelperSet(Argument::any())->willReturn();
        $helper->getName()->willReturn('git_config');
        return $helper;
    }

Usage Example

Пример #1
0
 protected function getGitConfigHelper($hasRemote = true)
 {
     $helper = parent::getGitConfigHelper();
     $helper->getRemoteInfo('origin')->willReturn(['host' => 'github.com', 'vendor' => 'gushphp', 'repo' => 'gush']);
     $helper->remoteExists('cordoval')->willReturn(false);
     $helper->remoteExists('origin')->willReturn($hasRemote);
     $helper->getGitConfig('remote.origin.url')->willReturn('[email protected]:gushphp/gush.git');
     return $helper;
 }