Skip to content

Commit 45f684c

Browse files
author
Viktor Kopin
committed
magento#1839 fix fail webapi tests
1 parent 59873a2 commit 45f684c

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

AdobeStockAsset/Model/Asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function getCreationDate(): string
112112
/**
113113
* @inheritdoc
114114
*/
115-
public function getExtensionAttributes(): AssetExtensionInterface
115+
public function getExtensionAttributes(): ?AssetExtensionInterface
116116
{
117117
return $this->_getExtensionAttributes();
118118
}

AdobeStockAsset/Test/Api/AssetRepository/DeleteByIdTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private function verifyAssetDeleted(): void
7373
$e,
7474
$expectedMessage,
7575
'env:Sender',
76-
[1 => self::FIXTURE_ASSET_ID]
76+
['id' => self::FIXTURE_ASSET_ID]
7777
);
7878
} else {
7979
throw $e;

AdobeStockAsset/Test/Api/AssetRepository/GetByIdTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testGetNoSuchEntityException(): void
5858
self::assertEquals(Exception::HTTP_NOT_FOUND, $e->getCode());
5959
} elseif (constant('TESTS_WEB_API_ADAPTER') === self::ADAPTER_SOAP) {
6060
$this->assertInstanceOf('SoapFault', $e);
61-
$this->checkSoapFault($e, $expectedMessage, 'env:Sender', [1 => $notExistedAssetId]);
61+
$this->checkSoapFault($e, $expectedMessage, 'env:Sender', ['id' => $notExistedAssetId]);
6262
} else {
6363
throw $e;
6464
}

AdobeStockAsset/Test/Api/AssetRepository/GetListTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class GetListTest extends WebapiAbstract
2323
{
2424
private const RESOURCE_PATH = '/V1/adobestock/asset/search';
25-
private const SERVICE_NAME = 'adobeStockAssetApiGetAssetListV1';
25+
private const SERVICE_NAME = 'adobeStockAssetApiAssetRepositoryV1';
2626

2727
/**
2828
* Test getting the Adobe Stock image by search criteria.
@@ -74,7 +74,7 @@ public function testGetList(): void
7474
],
7575
];
7676

77-
$response = $this->_webApiCall($serviceInfo, $searchCriteria);
77+
$response = $this->_webApiCall($serviceInfo, $requestData);
7878

7979
$this->assertArrayHasKey('search_criteria', $response);
8080
$this->assertArrayHasKey('total_count', $response);

AdobeStockAsset/Test/Api/SearchAdobeStockTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ public function testGetList(): void
8686
],
8787
'soap' => [
8888
'service' => self::SERVICE_NAME,
89-
'operation' => self::SERVICE_NAME . 'GetList',
89+
'operation' => self::SERVICE_NAME . 'Execute',
9090
],
9191
];
9292

93-
$response = $this->_webApiCall($serviceInfo, $searchCriteria);
93+
$response = $this->_webApiCall($serviceInfo, $requestData);
9494

9595
$this->assertArrayHasKey('search_criteria', $response);
9696
$this->assertArrayHasKey('total_count', $response);

AdobeStockAssetApi/Api/Data/AssetInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ public function getCreationDate(): string;
7575
/**
7676
* Retrieve existing extension attributes object or create a new one.
7777
*
78-
* @return \Magento\AdobeStockAssetApi\Api\Data\AssetExtensionInterface
78+
* @return \Magento\AdobeStockAssetApi\Api\Data\AssetExtensionInterface|null
7979
*/
80-
public function getExtensionAttributes(): AssetExtensionInterface;
80+
public function getExtensionAttributes(): ?AssetExtensionInterface;
8181

8282
/**
8383
* Set an extension attributes object.

0 commit comments

Comments
 (0)