1
0
Fork 0
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:
Jordi Boggiano 2020-06-17 17:37:39 +02:00
commit 04381c70fe
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
8 changed files with 72 additions and 84 deletions

View file

@ -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;
})