|
@@ -107,28 +107,22 @@ class GitDownloaderTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
|
$expectedGitCommand = $this->winCompat("git clone 'https://github.com/composer/composer' 'composerPath' && cd 'composerPath' && git remote add composer 'https://github.com/composer/composer' && git fetch composer");
|
|
|
$processExecutor->expects($this->at(2))
|
|
|
- ->method('execute')
|
|
|
- ->with($this->equalTo($expectedGitCommand))
|
|
|
- ->will($this->returnValue(1));
|
|
|
-
|
|
|
- $expectedGitCommand = $this->winCompat("git clone 'http://github.com/composer/composer' 'composerPath' && cd 'composerPath' && git remote add composer 'http://github.com/composer/composer' && git fetch composer");
|
|
|
- $processExecutor->expects($this->at(4))
|
|
|
->method('execute')
|
|
|
->with($this->equalTo($expectedGitCommand))
|
|
|
->will($this->returnValue(0));
|
|
|
|
|
|
$expectedGitCommand = $this->winCompat("git remote set-url --push origin 'git@github.com:composer/composer.git'");
|
|
|
- $processExecutor->expects($this->at(5))
|
|
|
+ $processExecutor->expects($this->at(3))
|
|
|
->method('execute')
|
|
|
->with($this->equalTo($expectedGitCommand), $this->equalTo(null), $this->equalTo($this->winCompat('composerPath')))
|
|
|
->will($this->returnValue(0));
|
|
|
|
|
|
- $processExecutor->expects($this->at(6))
|
|
|
+ $processExecutor->expects($this->at(4))
|
|
|
->method('execute')
|
|
|
->with($this->equalTo('git branch -r'))
|
|
|
->will($this->returnValue(0));
|
|
|
|
|
|
- $processExecutor->expects($this->at(7))
|
|
|
+ $processExecutor->expects($this->at(5))
|
|
|
->method('execute')
|
|
|
->with($this->equalTo($this->winCompat("git checkout 'ref' && git reset --hard 'ref'")), $this->equalTo(null), $this->equalTo($this->winCompat('composerPath')))
|
|
|
->will($this->returnValue(0));
|
|
@@ -142,7 +136,6 @@ class GitDownloaderTest extends \PHPUnit_Framework_TestCase
|
|
|
return array(
|
|
|
array('git', 'git@github.com:composer/composer.git'),
|
|
|
array('https', 'https://github.com/composer/composer.git'),
|
|
|
- array('http', 'https://github.com/composer/composer.git')
|
|
|
);
|
|
|
}
|
|
|
|