@@ -148,8 +148,8 @@ protected function createDownloadableProduct()
148
148
"price " => 10 ,
149
149
'attribute_set_id ' => 4 ,
150
150
"extension_attributes " => [
151
- "downloadable_product_links " => $ this ->getLinkData (),
152
- "downloadable_product_samples " => $ this ->getSampleData (),
151
+ "downloadable_product_links " => array_values ( $ this ->getLinkData () ),
152
+ "downloadable_product_samples " => array_values ( $ this ->getSampleData () ),
153
153
],
154
154
];
155
155
@@ -232,7 +232,7 @@ public function testUpdateDownloadableProductLinks()
232
232
233
233
$ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_links " ] =
234
234
[$ updatedLink1Data , $ linkData ['link1 ' ], $ linkData ['link2 ' ]];
235
- $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_samples " ] = null ;
235
+ unset( $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_samples " ]) ;
236
236
237
237
$ response = $ this ->saveProduct ($ response );
238
238
$ this ->assertTrue (
@@ -334,7 +334,7 @@ public function testUpdateDownloadableProductLinksWithNewFile()
334
334
335
335
$ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_links " ] =
336
336
[$ updatedLink1Data , $ updatedLink2Data ];
337
- $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_samples " ] = null ;
337
+ unset( $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_samples " ]) ;
338
338
339
339
$ response = $ this ->saveProduct ($ response );
340
340
$ this ->assertTrue (
@@ -410,7 +410,7 @@ public function testUpdateDownloadableProductSamples()
410
410
];
411
411
$ sampleData = $ this ->getSampleData ();
412
412
413
- $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_links " ] = null ;
413
+ unset( $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_links " ]) ;
414
414
$ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_samples " ] =
415
415
[$ updatedSample1Data , $ sampleData ['sample1 ' ], $ sampleData ['sample2 ' ]];
416
416
@@ -478,7 +478,7 @@ public function testUpdateDownloadableProductSamplesWithNewFile()
478
478
'sample_type ' => 'file ' ,
479
479
];
480
480
481
- $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_links " ] = null ;
481
+ unset( $ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_links " ]) ;
482
482
$ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_samples " ] =
483
483
[$ updatedSample1Data , $ updatedSamp2e1Data ];
484
484
0 commit comments