1
0
Fork 0

GitDriver: fix test for remote identifier on windows (#10727)

pull/10728/head
Stephan 2022-04-13 13:08:24 +01:00 committed by GitHub
parent 6c3958ec86
commit a5e35f911b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -77,6 +77,10 @@ GIT;
$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);
@ -95,8 +99,8 @@ GIT;
->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,
]]);