File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 77
88namespace Magento \ConfigurableProduct \Api ;
99
10+ use Magento \TestFramework \Helper \Bootstrap ;
11+ use Magento \Eav \Api \AttributeRepositoryInterface ;
12+
1013class OptionRepositoryTest extends \Magento \TestFramework \TestCase \WebapiAbstract
1114{
1215 const SERVICE_NAME = 'configurableProductOptionRepositoryV1 ' ;
@@ -138,6 +141,12 @@ public function testDelete()
138141 */
139142 public function testAdd ()
140143 {
144+ /** @var AttributeRepositoryInterface $attributeRepository */
145+ $ attributeRepository = Bootstrap::getObjectManager ()->create (AttributeRepositoryInterface::class);
146+
147+ /** @var \Magento\Eav\Api\Data\AttributeInterface $attribute */
148+ $ attribute = $ attributeRepository ->get ('catalog_product ' , 'test_configurable ' );
149+
141150 $ productSku = 'simple ' ;
142151 $ serviceInfo = [
143152 'rest ' => [
@@ -151,7 +160,7 @@ public function testAdd()
151160 ]
152161 ];
153162 $ option = [
154- 'attribute_id ' => ' test_configurable ' ,
163+ 'attribute_id ' => $ attribute -> getAttributeId () ,
155164 'label ' => 'Test ' ,
156165 'values ' => [
157166 [
You can’t perform that action at this time.
0 commit comments