mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +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
|
@ -1328,10 +1328,16 @@ EOF;
|
|||
$this->eventDispatcher
|
||||
->expects($this->exactly(2))
|
||||
->method('dispatchScript')
|
||||
->withConsecutive(
|
||||
[ScriptEvents::PRE_AUTOLOAD_DUMP, false],
|
||||
[ScriptEvents::POST_AUTOLOAD_DUMP, false]
|
||||
);
|
||||
->willReturnCallback(function ($type, $dev) {
|
||||
static $series = [
|
||||
[ScriptEvents::PRE_AUTOLOAD_DUMP, false],
|
||||
[ScriptEvents::POST_AUTOLOAD_DUMP, false]
|
||||
];
|
||||
|
||||
$this->assertSame(array_shift($series), [$type, $dev]);
|
||||
|
||||
return 0;
|
||||
});
|
||||
|
||||
$package = new RootPackage('root/a', '1.0', '1.0');
|
||||
$package->setAutoload(['psr-0' => ['Prefix' => 'foo/bar/non/existing/']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue