@@ -96,6 +96,7 @@ public function testQueryConfigurableProductLinks()
96
96
configurable_options {
97
97
id
98
98
attribute_id
99
+ attribute_id_v2
99
100
label
100
101
position
101
102
use_default
@@ -335,23 +336,15 @@ private function assertConfigurableVariants($actualResponse)
335
336
$ mediaGalleryEntries ,
336
337
"Precondition failed since there are incorrect number of media gallery entries "
337
338
);
338
- $ this ->assertIsArray ($ actualResponse ['variants ' ]
339
- [$ variantKey ]
340
- ['product ' ]
341
- ['media_gallery_entries ' ]
342
-
343
- );
339
+ $ this ->assertIsArray ($ actualResponse ['variants ' ][$ variantKey ]['product ' ]['media_gallery_entries ' ]);
344
340
$ this ->assertCount (
345
341
1 ,
346
342
$ actualResponse ['variants ' ][$ variantKey ]['product ' ]['media_gallery_entries ' ],
347
343
"there must be 1 record in the media gallery "
348
344
);
349
345
$ mediaGalleryEntry = $ mediaGalleryEntries [0 ];
350
346
$ this ->assertResponseFields (
351
- $ actualResponse ['variants ' ]
352
- [$ variantKey ]
353
- ['product ' ]
354
- ['media_gallery_entries ' ][0 ],
347
+ $ actualResponse ['variants ' ][$ variantKey ]['product ' ]['media_gallery_entries ' ][0 ],
355
348
[
356
349
'disabled ' => (bool )$ mediaGalleryEntry ->isDisabled (),
357
350
'file ' => $ mediaGalleryEntry ->getFile (),
@@ -363,12 +356,7 @@ private function assertConfigurableVariants($actualResponse)
363
356
);
364
357
$ videoContent = $ mediaGalleryEntry ->getExtensionAttributes ()->getVideoContent ();
365
358
$ this ->assertResponseFields (
366
- $ actualResponse ['variants ' ]
367
- [$ variantKey ]
368
- ['product ' ]
369
- ['media_gallery_entries ' ]
370
- [0 ]
371
- ['video_content ' ],
359
+ $ actualResponse ['variants ' ][$ variantKey ]['product ' ]['media_gallery_entries ' ][0 ]['video_content ' ],
372
360
[
373
361
'media_type ' =>$ videoContent ->getMediaType (),
374
362
'video_description ' => $ videoContent ->getVideoDescription (),
@@ -454,6 +442,11 @@ private function assertConfigurableProductOptions($actualResponse)
454
442
$ actualResponse ['configurable_options ' ][0 ]['attribute_id ' ],
455
443
$ configurableAttributeOption ['attribute_id ' ]
456
444
);
445
+ $ this ->assertEquals (
446
+ $ actualResponse ['configurable_options ' ][0 ]['attribute_id_v2 ' ],
447
+ $ configurableAttributeOption ['attribute_id ' ]
448
+ );
449
+ $ this ->assertIsInt ($ actualResponse ['configurable_options ' ][0 ]['attribute_id_v2 ' ]);
457
450
$ this ->assertEquals (
458
451
$ actualResponse ['configurable_options ' ][0 ]['label ' ],
459
452
$ configurableAttributeOption ['label ' ]
0 commit comments