File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
dev/tests/api-functional/testsuite/Magento/Downloadable/Api Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -472,6 +472,10 @@ public function testUpdateDownloadableProductSamplesWithNewFile()
472
472
'title ' => 'sample2_updated ' ,
473
473
'sort_order ' => 2 ,
474
474
'sample_type ' => 'file ' ,
475
+ 'sample_file_content ' => [
476
+ 'name ' => 'sample2.jpg ' ,
477
+ 'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
478
+ ],
475
479
];
476
480
477
481
$ response [ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY ]["downloadable_product_samples " ] =
@@ -606,7 +610,7 @@ protected function deleteProductBySku($productSku)
606
610
protected function saveProduct ($ product )
607
611
{
608
612
if (isset ($ product ['custom_attributes ' ])) {
609
- for ($ i= 0 ; $ i < sizeof ($ product ['custom_attributes ' ]); $ i ++) {
613
+ for ($ i = 0 , $ iMax = count ($ product ['custom_attributes ' ]); $ i < $ iMax ; $ i ++) {
610
614
if ($ product ['custom_attributes ' ][$ i ]['attribute_code ' ] == 'category_ids '
611
615
&& !is_array ($ product ['custom_attributes ' ][$ i ]['value ' ])
612
616
) {
You can’t perform that action at this time.
0 commit comments