File tree 1 file changed +10
-1
lines changed
dev/tests/api-functional/testsuite/Magento/ConfigurableProduct/Api
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \ConfigurableProduct \Api ;
9
9
10
+ use Magento \TestFramework \Helper \Bootstrap ;
11
+ use Magento \Eav \Api \AttributeRepositoryInterface ;
12
+
10
13
class OptionRepositoryTest extends \Magento \TestFramework \TestCase \WebapiAbstract
11
14
{
12
15
const SERVICE_NAME = 'configurableProductOptionRepositoryV1 ' ;
@@ -138,6 +141,12 @@ public function testDelete()
138
141
*/
139
142
public function testAdd ()
140
143
{
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
+
141
150
$ productSku = 'simple ' ;
142
151
$ serviceInfo = [
143
152
'rest ' => [
@@ -151,7 +160,7 @@ public function testAdd()
151
160
]
152
161
];
153
162
$ option = [
154
- 'attribute_id ' => ' test_configurable ' ,
163
+ 'attribute_id ' => $ attribute -> getAttributeId () ,
155
164
'label ' => 'Test ' ,
156
165
'values ' => [
157
166
[
You can’t perform that action at this time.
0 commit comments