@@ -27,15 +27,19 @@ public function testMissingRequires(array $expected, InstalledArrayRepository $r
2727 public static function provideMissingRequires ()
2828 {
2929 $ link = new Link ('source ' , 'target ' , new Constraint (Constraint::STR_OP_GE , '1 ' ));
30- $ repo = new InstalledArrayRepository ([]);
30+ $ repo = new InstalledArrayRepository ([
31+ 'php-http/discovery ' => new Package ('php-http/discovery ' , '1.0.0.0 ' , '1.0 ' ),
32+ ]);
3133
3234 yield 'empty ' => [[[], [], []], $ repo , [], []];
3335
3436 $ rootRequires = [
3537 'php-http/discovery ' => $ link ,
3638 'php-http/async-client-implementation ' => $ link ,
39+ 'psr/http-message-implementation ' => $ link ,
3740 ];
3841 $ expected = [[
42+ 'psr/http-message-implementation ' => [],
3943 'php-http/async-client-implementation ' => [
4044 'symfony/http-client ' ,
4145 'guzzlehttp/promises ' ,
@@ -49,15 +53,30 @@ public static function provideMissingRequires()
4953 yield 'async-httplug ' => [$ expected , $ repo , $ rootRequires , []];
5054
5155 $ repo = new InstalledArrayRepository ([
56+ 'php-http/discovery ' => new Package ('php-http/discovery ' , '1.0.0.0 ' , '1.0 ' ),
5257 'nyholm/psr7 ' => new Package ('nyholm/psr7 ' , '1.0.0.0 ' , '1.0 ' ),
5358 ]);
5459 $ repo ->setDevPackageNames (['nyholm/psr7 ' ]);
5560
56- $ expected [2 ] = [
61+ $ rootRequires = [
62+ 'php-http/discovery ' => $ link ,
63+ 'php-http/async-client-implementation ' => $ link ,
64+ ];
65+
66+ $ expected = [[
67+ 'php-http/async-client-implementation ' => [
68+ 'symfony/http-client ' ,
69+ 'guzzlehttp/promises ' ,
70+ 'php-http/message-factory ' ,
71+ ],
5772 'psr/http-factory-implementation ' => [
5873 'nyholm/psr7 ' ,
5974 ],
60- ];
75+ ], [], [
76+ 'psr/http-factory-implementation ' => [
77+ 'nyholm/psr7 ' ,
78+ ],
79+ ]];
6180
6281 yield 'move-to-require ' => [$ expected , $ repo , $ rootRequires , []];
6382 }
0 commit comments