1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Add --no-show-signature where git supports it, fixes #8966

This commit is contained in:
Jordi Boggiano 2020-06-17 16:37:06 +02:00
parent 472a62152d
commit 93d4cf6f91
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
6 changed files with 42 additions and 17 deletions

View file

@ -16,6 +16,7 @@ use Composer\Config;
use Composer\Package\Version\VersionGuesser;
use Composer\Semver\VersionParser;
use Composer\Test\TestCase;
use Composer\Util\Git as GitUtil;
class VersionGuesserTest extends TestCase
{
@ -66,7 +67,18 @@ class VersionGuesserTest extends TestCase
->expects($this->at($step))
->method('execute')
->willReturnCallback(function ($command, &$output) use ($self) {
$self->assertEquals('git log --pretty="%H" -n1 HEAD', $command);
$self->assertEquals('git --version', $command);
return 0;
})
;
++$step;
$executor
->expects($this->at($step))
->method('execute')
->willReturnCallback(function ($command, &$output) use ($self, $executor) {
$self->assertEquals('git log --pretty="%H" -n1 HEAD'.GitUtil::getNoShowSignatureFlag($executor), $command);
return 128;
})