|
9 | 9 | namespace Magento\ConfigurableProduct\Api;
|
10 | 10 |
|
11 | 11 | use Magento\Catalog\Model\ResourceModel\Eav\Attribute;
|
12 |
| -use Magento\Eav\Api\AttributeRepositoryInterface; |
13 | 12 | use Magento\Eav\Model\AttributeRepository;
|
14 | 13 | use Magento\Eav\Model\Entity\Attribute\Option;
|
15 | 14 | use Magento\Framework\Webapi\Rest\Request;
|
16 |
| -use Magento\TestFramework\Helper\Bootstrap; |
17 | 15 | use Magento\TestFramework\TestCase\WebapiAbstract;
|
18 | 16 |
|
19 | 17 | /**
|
@@ -89,52 +87,6 @@ public function testAddChild(): void
|
89 | 87 | $this->assertTrue($res);
|
90 | 88 | }
|
91 | 89 |
|
92 |
| - /** |
93 |
| - * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php |
94 |
| - * @magentoApiDataFixture Magento/ConfigurableProduct/_files/configurable_attribute.php |
95 |
| - * @magentoApiDataFixture Magento/ConfigurableProduct/_files/product_simple_77.php |
96 |
| - * @magentoApiDataFixture Magento/ConfigurableProduct/_files/delete_association.php |
97 |
| - * |
98 |
| - * @return void |
99 |
| - */ |
100 |
| - public function testAddChildToConfigurableProdWithoutOption(): void |
101 |
| - { |
102 |
| - /** @var AttributeRepositoryInterface $attributeRepository */ |
103 |
| - $attributeRepository = Bootstrap::getObjectManager()->create(AttributeRepositoryInterface::class); |
104 |
| - |
105 |
| - /** @var \Magento\Eav\Api\Data\AttributeInterface $attribute */ |
106 |
| - $attribute = $attributeRepository->get('catalog_product', 'test_configurable'); |
107 |
| - |
108 |
| - $productSku = 'simple'; |
109 |
| - $serviceInfo = [ |
110 |
| - 'rest' => [ |
111 |
| - 'resourcePath' => self::RESOURCE_PATH . '/' . $productSku . '/options', |
112 |
| - 'httpMethod' => Request::HTTP_METHOD_POST |
113 |
| - ], |
114 |
| - 'soap' => [ |
115 |
| - 'service' => self::SERVICE_NAME, |
116 |
| - 'serviceVersion' => self::SERVICE_VERSION, |
117 |
| - 'operation' => self::SERVICE_NAME . 'Save' |
118 |
| - ] |
119 |
| - ]; |
120 |
| - $option = [ |
121 |
| - 'attribute_id' => $attribute->getAttributeId(), |
122 |
| - 'label' => 'Test', |
123 |
| - 'values' => [ |
124 |
| - [ |
125 |
| - 'value_index' => 1, |
126 |
| - ] |
127 |
| - ], |
128 |
| - ]; |
129 |
| - /** @var int $result */ |
130 |
| - $result = $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'option' => $option]); |
131 |
| - $this->assertGreaterThan(0, $result); |
132 |
| - |
133 |
| - $childSku = 'simple_77'; |
134 |
| - $res = $this->addChild($productSku, $childSku); |
135 |
| - $this->assertTrue($res); |
136 |
| - } |
137 |
| - |
138 | 90 | /**
|
139 | 91 | * Test the full flow of creating a configurable product and adding a child via REST
|
140 | 92 | *
|
|
0 commit comments