mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Add IOMock and get rid of all withConsecutive calls in tests (#11497)
This commit is contained in:
parent
ebd0a60411
commit
9f3e2105da
15 changed files with 394 additions and 265 deletions
|
@ -258,10 +258,14 @@ class DownloadManagerTest extends TestCase
|
|||
$package
|
||||
->expects($this->exactly(2))
|
||||
->method('setInstallationSource')
|
||||
->withConsecutive(
|
||||
['dist'],
|
||||
['source']
|
||||
);
|
||||
->willReturnCallback(function ($type) {
|
||||
static $series = [
|
||||
'dist',
|
||||
'source',
|
||||
];
|
||||
|
||||
$this->assertSame(array_shift($series), $type);
|
||||
});
|
||||
|
||||
$downloaderFail = $this->createDownloaderMock();
|
||||
$downloaderFail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue