Skip to content

Commit

Permalink
#19806: Web-Api test fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
p-bystritsky committed Apr 17, 2019
1 parent b39550a commit d598262
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@ public function testUpdateDownloadableProductSamplesWithNewFile()
'title' => 'sample2_updated',
'sort_order' => 2,
'sample_type' => 'file',
'sample_file_content' => [
'name' => 'sample2.jpg',
'file_data' => base64_encode(file_get_contents($this->testImagePath)),
],
];

$response[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]["downloadable_product_samples"] =
Expand Down Expand Up @@ -606,7 +610,7 @@ protected function deleteProductBySku($productSku)
protected function saveProduct($product)
{
if (isset($product['custom_attributes'])) {
for ($i=0; $i<sizeof($product['custom_attributes']); $i++) {
for ($i = 0, $iMax = count($product['custom_attributes']); $i < $iMax; $i++) {
if ($product['custom_attributes'][$i]['attribute_code'] == 'category_ids'
&& !is_array($product['custom_attributes'][$i]['value'])
) {
Expand Down

0 comments on commit d598262

Please sign in to comment.