20 $testAttributeCode =
'quantity_and_stock_status';
34 'resourcePath' => self::RESOURCE_PATH .
'/' . $testAttributeCode .
'/options',
40 'operation' => self::SERVICE_NAME .
'getItems',
47 $this->assertEquals($expectedOptions,
$response);
56 $testAttributeCode =
'select_attribute';
59 'resourcePath' => self::RESOURCE_PATH .
'/' . $testAttributeCode .
'/options',
65 'operation' => self::SERVICE_NAME .
'add',
72 'attributeCode' => $testAttributeCode,
78 $updatedData = $this->getAttributeOptions($testAttributeCode);
79 $lastOption = array_pop($updatedData);
105 'option_without_value_node' => [
108 'option_with_value_node_that_starts_with_text' => [
111 'option_with_value_node_that_starts_with_a_number' => [
126 $this->assertGreaterThan(0, count($optionList));
127 $lastOption = array_pop($optionList);
128 $this->assertNotEmpty($lastOption[
'value']);
139 'operation' => self::SERVICE_NAME .
'delete',
150 $this->assertEquals($optionList, $updatedOptions);
157 private function getAttributeOptions($testAttributeCode)
161 'resourcePath' => self::RESOURCE_PATH .
'/' . $testAttributeCode .
'/options',
167 'operation' => self::SERVICE_NAME .
'getItems',
170 return $this->
_webApiCall($serviceInfo, [
'attributeCode' => $testAttributeCode]);
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)