mirror of
https://github.com/composer/composer
synced 2025-05-10 00:53:06 +00:00
Always make sure we are on the right branch
This commit is contained in:
parent
110044c3ea
commit
f752b29fc6
2 changed files with 13 additions and 10 deletions
|
@ -68,12 +68,12 @@ class GitDownloaderTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$processExecutor->expects($this->at(1))
|
||||
->method('execute')
|
||||
->with($this->equalTo($this->getCmd("git log 'master' -1 --format=format:%H")), $this->equalTo(null), $this->equalTo('composerPath'))
|
||||
->with($this->equalTo($this->getCmd("git checkout 'master'")), $this->equalTo(null), $this->equalTo('composerPath'))
|
||||
->will($this->returnValue(0));
|
||||
|
||||
$processExecutor->expects($this->at(2))
|
||||
->method('execute')
|
||||
->with($this->equalTo($this->getCmd("git checkout '1234567890123456789012345678901234567890' && git reset --hard '1234567890123456789012345678901234567890'")), $this->equalTo(null), $this->equalTo('composerPath'))
|
||||
->with($this->equalTo($this->getCmd("git reset --hard '1234567890123456789012345678901234567890'")), $this->equalTo(null), $this->equalTo('composerPath'))
|
||||
->will($this->returnValue(0));
|
||||
|
||||
$downloader = $this->getDownloaderMock(null, null, $processExecutor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue