mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Merge branch '1.10'
This commit is contained in:
commit
04381c70fe
8 changed files with 72 additions and 84 deletions
|
@ -16,6 +16,8 @@ use Composer\Config;
|
|||
use Composer\Package\Version\VersionGuesser;
|
||||
use Composer\Semver\VersionParser;
|
||||
use Composer\Test\TestCase;
|
||||
use Composer\Util\Git as GitUtil;
|
||||
use Composer\Util\ProcessExecutor;
|
||||
|
||||
class VersionGuesserTest extends TestCase
|
||||
{
|
||||
|
@ -30,7 +32,7 @@ class VersionGuesserTest extends TestCase
|
|||
{
|
||||
$branch = 'default';
|
||||
|
||||
$executor = $this->getMockBuilder('\\Composer\\Util\\ProcessExecutor')
|
||||
$executor = $this->getMockBuilder('Composer\\Util\\ProcessExecutor')
|
||||
->setMethods(array('execute'))
|
||||
->disableArgumentCloning()
|
||||
->disableOriginalConstructor()
|
||||
|
@ -40,6 +42,8 @@ class VersionGuesserTest extends TestCase
|
|||
$self = $this;
|
||||
$step = 0;
|
||||
|
||||
GitUtil::getVersion(new ProcessExecutor);
|
||||
|
||||
$executor
|
||||
->expects($this->at($step))
|
||||
->method('execute')
|
||||
|
@ -65,8 +69,8 @@ class VersionGuesserTest extends TestCase
|
|||
$executor
|
||||
->expects($this->at($step))
|
||||
->method('execute')
|
||||
->willReturnCallback(function ($command, &$output) use ($self) {
|
||||
$self->assertEquals('git log --pretty="%H" -n1 HEAD', $command);
|
||||
->willReturnCallback(function ($command, &$output) use ($self, $executor) {
|
||||
$self->assertEquals('git log --pretty="%H" -n1 HEAD'.GitUtil::getNoShowSignatureFlag($executor), $command);
|
||||
|
||||
return 128;
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue