Skip to content

Commit cdce16e

Browse files
author
Viktor Kopin
committed
magento#1846 fix unit test failure
1 parent a55fc41 commit cdce16e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

AdobeStockAsset/Model/SaveAsset.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,11 @@ public function execute(AssetInterface $asset): void
8080

8181
$category = $asset->getCategory();
8282
if ($category !== null) {
83-
if ($category->getId() !== null) {
83+
$categoryId = $category->getId();
84+
if ($categoryId !== null) {
8485
$category = $this->categoryRepository->save($category);
8586
}
86-
$data[self::CATEGORY_ID] = $category->getId();
87+
$data[self::CATEGORY_ID] = $categoryId;
8788
$data[self::CATEGORY] = $category;
8889
}
8990
$creator = $asset->getCreator();

AdobeStockAsset/Test/Integration/Model/SaveAssetTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ protected function setUp(): void
7070

7171
/**
7272
* Test save an Adobe Stock asset.
73+
*
7374
* @param array $caseData
7475
*
7576
* @dataProvider getAssetData

0 commit comments

Comments
 (0)