Skip to content

Commit

Permalink
GitDriver: fix test for remote identifier on windows (#10727)
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubinix committed Apr 13, 2022
1 parent 6c3958e commit a5e35f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Composer/Test/Repository/Vcs/GitDriverTest.php
Expand Up @@ -77,6 +77,10 @@ public function testGetRootIdentifierFromRemote(): void
$process = $this->getProcessExecutorMock();
$io = $this->getMockBuilder(IOInterface::class)->getMock();

$io
->expects($this->never())
->method('writeError');

$driver = new GitDriver(['url' => 'https://example.org/acme.git'], $io, $this->config, $this->getHttpDownloaderMock(), $process);
$this->setRepoDir($driver, $this->home);

Expand All @@ -95,8 +99,8 @@ public function testGetRootIdentifierFromRemote(): void
->expects([[
'cmd' => 'git remote -v',
'stdout' => '',
],[
'cmd' => "git remote set-url origin -- 'https://example.org/acme.git' && git remote show origin && git remote set-url origin -- 'https://example.org/acme.git'",
], [
'cmd' => Platform::isWindows() ? "git remote set-url origin -- https://example.org/acme.git && git remote show origin && git remote set-url origin -- https://example.org/acme.git" : "git remote set-url origin -- 'https://example.org/acme.git' && git remote show origin && git remote set-url origin -- 'https://example.org/acme.git'",
'stdout' => $stdout,
]]);

Expand Down

0 comments on commit a5e35f9

Please sign in to comment.