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

Stop relying on OS to find executables on Windows, and migrate most Process calls to array syntax (#12180)

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
This commit is contained in:
Nicolas Grekas 2024-11-06 13:49:06 +01:00 committed by GitHub
parent 5a75d32414
commit 3dc279cf66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 714 additions and 584 deletions

View file

@ -303,18 +303,18 @@ class GitHubDriverTest extends TestCase
$process = $this->getProcessExecutorMock();
$process->expects([
['cmd' => 'git config github.accesstoken', 'return' => 1],
'git clone --mirror -- '.ProcessExecutor::escape($repoSshUrl).' '.ProcessExecutor::escape($this->config->get('cache-vcs-dir').'/git-github.com-composer-packagist.git/'),
['cmd' => ['git', 'config', 'github.accesstoken'], 'return' => 1],
['git', 'clone', '--mirror', '--', $repoSshUrl, $this->config->get('cache-vcs-dir').'/git-github.com-composer-packagist.git/'],
[
'cmd' => 'git show-ref --tags --dereference',
'cmd' => ['git', 'show-ref', '--tags', '--dereference'],
'stdout' => $sha.' refs/tags/'.$identifier,
],
[
'cmd' => 'git branch --no-color --no-abbrev -v',
'cmd' => ['git', 'branch', '--no-color', '--no-abbrev', '-v'],
'stdout' => ' test_master edf93f1fccaebd8764383dc12016d0a1a9672d89 Fix test & behavior',
],
[
'cmd' => 'git branch --no-color',
'cmd' => ['git', 'branch', '--no-color'],
'stdout' => '* test_master',
],
], true);