コード例 #1
0
 protected function getGitConfigHelper()
 {
     $helper = parent::getGitConfigHelper();
     $helper->ensureRemoteExists('gushphp', 'gush')->shouldBeCalled();
     $helper->ensureRemoteExists('cordoval', 'gush')->shouldBeCalled();
     return $helper;
 }
コード例 #2
0
ファイル: CoreInitCommandTest.php プロジェクト: gushphp/gush
 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('git@github.com:gushphp/gush.git');
     return $helper;
 }
コード例 #3
0
 protected function getGitConfigHelper($localBranchExists = false, $remoteMatches = false)
 {
     $helper = parent::getGitConfigHelper();
     $helper->ensureRemoteExists('cordoval', 'gush')->shouldBeCalled();
     if (!$localBranchExists) {
         $helper->setGitConfig('branch.head_ref.remote', 'cordoval', true)->shouldBeCalled();
     } else {
         $helper->getGitConfig('branch.head_ref.remote')->willReturn($remoteMatches ? 'cordoval' : 'someone');
     }
     return $helper;
 }
コード例 #4
0
 protected function getGitConfigHelper($remoteName = 'cordoval', $url = 'git@github.com:cordoval/gush.git')
 {
     $gitHelper = parent::getGitConfigHelper();
     $gitHelper->setRemote($remoteName, $url)->shouldBeCalled();
     return $gitHelper;
 }
コード例 #5
0
 protected function getGitConfigHelper($sourceOrg = 'cordoval', $sourceRepo = 'gush')
 {
     $helper = parent::getGitConfigHelper();
     $helper->ensureRemoteExists('gushphp', 'gush')->shouldBeCalled();
     $helper->remoteExists($sourceOrg, $sourceRepo)->willReturn();
     $helper->ensureRemoteExists($sourceOrg, $sourceRepo)->willReturn();
     return $helper;
 }
コード例 #6
0
 protected function getGitConfigHelper($notes = true)
 {
     $helper = parent::getGitConfigHelper();
     $helper->ensureRemoteExists('gushphp', 'gush')->shouldBeCalled();
     // base
     $helper->ensureRemoteExists('cordoval', 'gush')->shouldBeCalled();
     // source
     if ($notes) {
         $helper->ensureNotesFetching('gushphp')->shouldBeCalled();
     }
     return $helper;
 }
コード例 #7
0
 protected function getGitConfigHelper($org = 'gushphp', $repo = 'gush')
 {
     $helper = parent::getGitConfigHelper();
     $helper->ensureRemoteExists($org, $repo)->shouldBeCalled();
     return $helper;
 }