@@ -176,43 +176,62 @@ public function testGetPackageVersions()
176
176
177
177
$ this ->systemPackage = new SystemPackage ($ this ->composerAppFactory , $ this ->composerInformation );
178
178
179
- $ this ->infoCommand ->expects ($ this ->at ( 0 ))
179
+ $ this ->infoCommand ->expects ($ this ->any ( ))
180
180
->method ('run ' )
181
- ->with ('magento/product-community-edition ' )
182
- ->willReturn (
181
+ ->willReturnMap ([
183
182
[
184
- 'name ' => 'magento/product-community-edition ' ,
185
- 'description ' => 'eCommerce Platform for Growth (Enterprise Edition) ' ,
186
- 'keywords ' => '' ,
187
- 'versions ' => '1.2.0, 1.1.0, 1.1.0-RC1, * 1.0.0 ' ,
188
- 'type ' => 'metapackage ' ,
189
- 'license ' => 'OSL-3.0, AFL-3.0 ' ,
190
- 'source ' => '[] ' ,
191
- 'names ' => 'magento/product-community-edition ' ,
192
- 'current_version ' => '1.0.0 ' ,
193
- 'available_versions ' => [1 => '1.2.0 ' , 2 => '1.1.0 ' , 3 => '1.1.0-RC1 ' , 4 => '1.0.0 ' ],
194
- 'new_versions ' => ['1.2.0 ' , '1.1.0 ' , '1.1.0-RC1 ' ],
195
- ]
196
- );
197
-
198
- $ this ->infoCommand ->expects ($ this ->at (1 ))
199
- ->method ('run ' )
200
- ->with ('magento/product-enterprise-edition ' )
201
- ->willReturn (
183
+ 'magento/product-community-edition ' ,
184
+ false ,
185
+ [
186
+ 'name ' => 'magento/product-community-edition ' ,
187
+ 'description ' => 'eCommerce Platform for Growth (Enterprise Edition) ' ,
188
+ 'keywords ' => '' ,
189
+ 'versions ' => '1.2.0, 1.1.0, 1.1.0-RC1, * 1.0.0 ' ,
190
+ 'type ' => 'metapackage ' ,
191
+ 'license ' => 'OSL-3.0, AFL-3.0 ' ,
192
+ 'source ' => '[] ' ,
193
+ 'names ' => 'magento/product-community-edition ' ,
194
+ 'current_version ' => '1.0.0 ' ,
195
+ 'available_versions ' => [1 => '1.2.0 ' , 2 => '1.1.0 ' , 3 => '1.1.0-RC1 ' , 4 => '1.0.0 ' ],
196
+ 'new_versions ' => ['1.2.0 ' , '1.1.0 ' , '1.1.0-RC1 ' ],
197
+ ],
198
+ ],
202
199
[
203
- 'name ' => 'magento/product-enterprise-edition ' ,
204
- 'description ' => 'eCommerce Platform for Growth (Enterprise Edition) ' ,
205
- 'keywords ' => '' ,
206
- 'versions ' => '1.2.0, 1.1.0, 1.1.0-RC1, * 1.0.0 ' ,
207
- 'type ' => 'metapackage ' ,
208
- 'license ' => 'OSL-3.0, AFL-3.0 ' ,
209
- 'source ' => '[] ' ,
210
- 'names ' => 'magento/product-enterprise-edition ' ,
211
- 'current_version ' => '1.0.0 ' ,
212
- 'available_versions ' => [1 => '1.2.0 ' , 2 => '1.1.0 ' , 3 => '1.1.0-RC1 ' , 4 => '1.0.0 ' ],
213
- 'new_versions ' => ['1.2.0 ' , '1.1.0 ' , '1.1.0-RC1 ' ],
214
- ]
215
- );
200
+ 'magento/product-enterprise-edition ' ,
201
+ false ,
202
+ [
203
+ 'name ' => 'magento/product-enterprise-edition ' ,
204
+ 'description ' => 'eCommerce Platform for Growth (Enterprise Edition) ' ,
205
+ 'keywords ' => '' ,
206
+ 'versions ' => '1.2.0, 1.1.0, 1.1.0-RC1, * 1.0.0 ' ,
207
+ 'type ' => 'metapackage ' ,
208
+ 'license ' => 'OSL-3.0, AFL-3.0 ' ,
209
+ 'source ' => '[] ' ,
210
+ 'names ' => 'magento/product-enterprise-edition ' ,
211
+ 'current_version ' => '1.0.0 ' ,
212
+ 'available_versions ' => [1 => '1.2.0 ' , 2 => '1.1.0 ' , 3 => '1.1.0-RC1 ' , 4 => '1.0.0 ' ],
213
+ 'new_versions ' => ['1.2.0 ' , '1.1.0 ' , '1.1.0-RC1 ' ],
214
+ ],
215
+
216
+ ],
217
+ [
218
+
219
+ 'magento/product-b2b-edition ' ,
220
+ false ,
221
+ [
222
+ 'name ' => 'magento/product-b2b-edition ' ,
223
+ 'description ' => 'eCommerce Platform for Growth (B2B Edition) ' ,
224
+ 'keywords ' => '' ,
225
+ 'versions ' => '1.2.0, 1.1.0, 1.1.0-RC1, * 1.0.0 ' ,
226
+ 'type ' => 'metapackage ' ,
227
+ 'license ' => 'OSL-3.0, AFL-3.0 ' ,
228
+ 'source ' => '[] ' ,
229
+ 'names ' => 'magento/product-b2b-edition ' ,
230
+ 'available_versions ' => [],
231
+ 'new_versions ' => ['1.2.0 ' , '1.1.0 ' , '1.1.0-RC1 ' ],
232
+ ],
233
+ ],
234
+ ]);
216
235
$ this ->assertEquals ($ this ->expectedPackages , $ this ->systemPackage ->getPackageVersions ());
217
236
}
218
237
0 commit comments