@@ -51,11 +51,13 @@ protected function getLinkData()
51
51
'link_type ' => 'file ' ,
52
52
'link_file_content ' => [
53
53
'name ' => 'link1_content.jpg ' ,
54
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
54
55
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
55
56
],
56
57
'sample_type ' => 'file ' ,
57
58
'sample_file_content ' => [
58
59
'name ' => 'link1_sample.jpg ' ,
60
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
59
61
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
60
62
],
61
63
],
@@ -114,6 +116,7 @@ protected function getSampleData()
114
116
'sample_type ' => 'file ' ,
115
117
'sample_file_content ' => [
116
118
'name ' => 'sample2.jpg ' ,
119
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
117
120
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
118
121
],
119
122
],
@@ -146,7 +149,9 @@ protected function createDownloadableProduct()
146
149
"price " => 10 ,
147
150
'attribute_set_id ' => 4 ,
148
151
"extension_attributes " => [
152
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
149
153
"downloadable_product_links " => array_values ($ this ->getLinkData ()),
154
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
150
155
"downloadable_product_samples " => array_values ($ this ->getSampleData ()),
151
156
],
152
157
];
@@ -301,11 +306,13 @@ public function testUpdateDownloadableProductLinksWithNewFile()
301
306
'link_type ' => 'file ' ,
302
307
'link_file_content ' => [
303
308
'name ' => $ linkFile . $ extension ,
309
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
304
310
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
305
311
],
306
312
'sample_type ' => 'file ' ,
307
313
'sample_file_content ' => [
308
314
'name ' => $ sampleFile . $ extension ,
315
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
309
316
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
310
317
],
311
318
];
@@ -319,11 +326,13 @@ public function testUpdateDownloadableProductLinksWithNewFile()
319
326
'link_type ' => 'file ' ,
320
327
'link_file_content ' => [
321
328
'name ' => 'link2_content.jpg ' ,
329
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
322
330
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
323
331
],
324
332
'sample_type ' => 'file ' ,
325
333
'sample_file_content ' => [
326
334
'name ' => 'link2_sample.jpg ' ,
335
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
327
336
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
328
337
],
329
338
];
@@ -463,6 +472,7 @@ public function testUpdateDownloadableProductSamplesWithNewFile()
463
472
'sample_type ' => 'file ' ,
464
473
'sample_file_content ' => [
465
474
'name ' => 'sample1.jpg ' ,
475
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
466
476
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
467
477
],
468
478
];
@@ -474,6 +484,7 @@ public function testUpdateDownloadableProductSamplesWithNewFile()
474
484
'sample_type ' => 'file ' ,
475
485
'sample_file_content ' => [
476
486
'name ' => 'sample2.jpg ' ,
487
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
477
488
'file_data ' => base64_encode (file_get_contents ($ this ->testImagePath )),
478
489
],
479
490
];
0 commit comments