Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
api-functional
testsuite
Magento
Catalog
Api
CategoryAttributeOptionManagementInterfaceTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Api
;
7
8
use
Magento\TestFramework\TestCase\WebapiAbstract
;
9
10
class
CategoryAttributeOptionManagementInterfaceTest
extends
WebapiAbstract
11
{
12
const
SERVICE_NAME
=
'catalogCategoryAttributeOptionManagementV1'
;
13
const
SERVICE_VERSION
=
'V1'
;
14
const
RESOURCE_PATH
=
'/V1/categories/attributes'
;
15
16
public
function
testGetItems
()
17
{
18
$this->
_markTestAsRestOnly
(
'Fix inconsistencies in WSDL and Data interfaces'
);
19
$testAttributeCode =
'include_in_menu'
;
20
$expectedOptions = [
21
[
22
'label'
=>
'Yes'
,
23
'value'
=>
'1'
,
24
],
25
[
26
'label'
=>
'No'
,
27
'value'
=>
'0'
,
28
],
29
];
30
31
$serviceInfo = [
32
'rest'
=> [
33
'resourcePath'
=> self::RESOURCE_PATH .
'/'
. $testAttributeCode .
'/options'
,
34
'httpMethod'
=>
\Magento\Framework\Webapi\Rest\Request::HTTP_METHOD_GET
,
35
],
36
'soap'
=> [
37
'service'
=>
self::SERVICE_NAME
,
38
'serviceVersion'
=>
self::SERVICE_VERSION
,
39
'operation'
=> self::SERVICE_NAME .
'getItems'
,
40
],
41
];
42
43
$response
= $this->
_webApiCall
($serviceInfo, [
'attributeCode'
=> $testAttributeCode]);
44
45
$this->assertTrue(is_array(
$response
));
46
$this->assertEquals($expectedOptions,
$response
);
47
}
48
}
Magento\Catalog\Api\CategoryAttributeOptionManagementInterfaceTest\SERVICE_VERSION
const SERVICE_VERSION
Definition:
CategoryAttributeOptionManagementInterfaceTest.php:13
Magento\Catalog\Api\CategoryAttributeOptionManagementInterfaceTest\RESOURCE_PATH
const RESOURCE_PATH
Definition:
CategoryAttributeOptionManagementInterfaceTest.php:14
Magento\Catalog\Api
Definition:
AttributeSetManagementTest.php:7
$response
$response
Definition:
404.php:11
Magento\Catalog\Api\CategoryAttributeOptionManagementInterfaceTest
Definition:
CategoryAttributeOptionManagementInterfaceTest.php:10
Magento\TestFramework\TestCase\WebapiAbstract\_markTestAsRestOnly
_markTestAsRestOnly($message=null)
Definition:
WebapiAbstract.php:192
Magento\TestFramework\TestCase\WebapiAbstract\_webApiCall
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
Definition:
WebapiAbstract.php:165
Magento\Catalog\Api\CategoryAttributeOptionManagementInterfaceTest\testGetItems
testGetItems()
Definition:
CategoryAttributeOptionManagementInterfaceTest.php:16
Magento\Catalog\Api\CategoryAttributeOptionManagementInterfaceTest\SERVICE_NAME
const SERVICE_NAME
Definition:
CategoryAttributeOptionManagementInterfaceTest.php:12
Magento\Framework\Webapi\Rest\Request\HTTP_METHOD_GET
const HTTP_METHOD_GET
Definition:
Request.php:19
Magento\TestFramework\TestCase\WebapiAbstract
Definition:
WebapiAbstract.php:19