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

fix risky tests (without any assertion)

This commit is contained in:
Ion Bazan 2020-02-07 14:35:07 +08:00
parent db32d6bc18
commit 58b34d13e8
11 changed files with 33 additions and 16 deletions

View file

@ -102,6 +102,7 @@ class GitTest extends TestCase
$this->mockConfig($protocol);
$this->process
->expects($this->atLeast(2))
->method('execute')
->willReturnMap(array(
array('git command failing', null, null, 1),
@ -113,11 +114,13 @@ class GitTest extends TestCase
->willReturn(false);
$this->io
->expects($this->atLeastOnce())
->method('hasAuthentication')
->with($this->equalTo('github.com'))
->willReturn(true);
$this->io
->expects($this->atLeastOnce())
->method('getAuthentication')
->with($this->equalTo('github.com'))
->willReturn(array('username' => 'token', 'password' => $gitHubToken));