1
0
Fork 0
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:
Jordi Boggiano 2023-06-07 14:35:16 +02:00 committed by GitHub
parent ebd0a60411
commit 9f3e2105da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 394 additions and 265 deletions

View file

@ -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/']]);