@@ -331,90 +331,6 @@ public function galleryImagesWithImageOptimizationParametersInUrlDataProvider():
331
331
];
332
332
}
333
333
334
- /**
335
- * @dataProvider galleryImagesWithImageOptimizationParametersInUrlDataProvider
336
- * @magentoDataFixture Magento/Catalog/_files/product_with_multiple_images.php
337
- * @magentoConfigFixture default/web/url/catalog_media_url_format image_optimization_parameters
338
- * @magentoDbIsolation enabled
339
- * @param array $images
340
- * @param array $expectation
341
- * @return void
342
- */
343
- public function testGetGalleryImagesJsonWithImageOptimizationParametersInUrl (
344
- array $ images ,
345
- array $ expectation
346
- ): void {
347
- $ product = $ this ->getProduct ();
348
- $ this ->setGalleryImages ($ product , $ images );
349
- $ this ->block ->setData ('product ' , $ this ->getProduct ());
350
- [$ firstImage , $ secondImage ] = $ this ->serializer ->unserialize ($ this ->block ->getGalleryImagesJson ());
351
- [$ firstExpectedImage , $ secondExpectedImage ] = $ expectation ;
352
- $ this ->assertImages ($ firstImage , $ firstExpectedImage );
353
- $ this ->assertImages ($ secondImage , $ secondExpectedImage );
354
- }
355
-
356
- /**
357
- * @return array
358
- */
359
- public function galleryImagesWithImageOptimizationParametersInUrlDataProvider (): array
360
- {
361
-
362
- $ imageExpectation = [
363
- 'thumb ' => '/m/a/magento_image.jpg?width=88&height=110&store=default&image-type=thumbnail ' ,
364
- 'img ' => '/m/a/magento_image.jpg?width=700&height=700&store=default&image-type=image ' ,
365
- 'full ' => '/m/a/magento_image.jpg?store=default&image-type=image ' ,
366
- 'caption ' => 'Image Alt Text ' ,
367
- 'position ' => '1 ' ,
368
- 'isMain ' => false ,
369
- 'type ' => 'image ' ,
370
- 'videoUrl ' => null ,
371
- ];
372
-
373
- $ thumbnailExpectation = [
374
- 'thumb ' => '/m/a/magento_thumbnail.jpg?width=88&height=110&store=default&image-type=thumbnail ' ,
375
- 'img ' => '/m/a/magento_thumbnail.jpg?width=700&height=700&store=default&image-type=image ' ,
376
- 'full ' => '/m/a/magento_thumbnail.jpg?store=default&image-type=image ' ,
377
- 'caption ' => 'Thumbnail Image ' ,
378
- 'position ' => '2 ' ,
379
- 'isMain ' => false ,
380
- 'type ' => 'image ' ,
381
- 'videoUrl ' => null ,
382
- ];
383
-
384
- return [
385
- 'with_main_image ' => [
386
- 'images ' => [
387
- '/m/a/magento_image.jpg ' => [],
388
- '/m/a/magento_thumbnail.jpg ' => ['main ' => true ],
389
- ],
390
- 'expectation ' => [
391
- $ imageExpectation ,
392
- array_merge ($ thumbnailExpectation , ['isMain ' => true ]),
393
- ],
394
- ],
395
- 'without_main_image ' => [
396
- 'images ' => [
397
- '/m/a/magento_image.jpg ' => [],
398
- '/m/a/magento_thumbnail.jpg ' => [],
399
- ],
400
- 'expectation ' => [
401
- array_merge ($ imageExpectation , ['isMain ' => true ]),
402
- $ thumbnailExpectation ,
403
- ],
404
- ],
405
- 'with_changed_position ' => [
406
- 'images ' => [
407
- '/m/a/magento_image.jpg ' => ['position ' => '2 ' ],
408
- '/m/a/magento_thumbnail.jpg ' => ['position ' => '1 ' ],
409
- ],
410
- 'expectation ' => [
411
- array_merge ($ thumbnailExpectation , ['position ' => '1 ' ]),
412
- array_merge ($ imageExpectation , ['position ' => '2 ' , 'isMain ' => true ]),
413
- ],
414
- ],
415
- ];
416
- }
417
-
418
334
/**
419
335
* @dataProvider galleryImagesOnStoreViewDataProvider
420
336
* @magentoDataFixture Magento/Catalog/_files/product_with_multiple_images.php
0 commit comments