|
8 | 8 |
|
9 | 9 | namespace Magento\ConfigurableProduct\Api; |
10 | 10 |
|
11 | | -use Magento\Catalog\Model\ProductRepository; |
12 | 11 | use Magento\TestFramework\Helper\Bootstrap; |
| 12 | +use Magento\Catalog\Model\ProductRepository; |
13 | 13 | use Magento\Eav\Api\AttributeRepositoryInterface; |
14 | 14 |
|
15 | 15 | /** |
16 | 16 | * Class OptionRepositoryTest for testing ConfigurableProductoption integration |
17 | 17 | */ |
18 | 18 | class OptionRepositoryTest extends \Magento\TestFramework\TestCase\WebapiAbstract |
19 | 19 | { |
20 | | - public const SERVICE_NAME = 'configurableProductOptionRepositoryV1'; |
21 | | - public const SERVICE_VERSION = 'V1'; |
22 | | - public const RESOURCE_PATH = '/V1/configurable-products'; |
| 20 | + const SERVICE_NAME = 'configurableProductOptionRepositoryV1'; |
| 21 | + const SERVICE_VERSION = 'V1'; |
| 22 | + const RESOURCE_PATH = '/V1/configurable-products'; |
23 | 23 |
|
24 | 24 | /** |
25 | 25 | * @magentoApiDataFixture Magento/ConfigurableProduct/_files/product_configurable.php |
@@ -190,15 +190,12 @@ public function testAdd(): void |
190 | 190 | ] |
191 | 191 | ], |
192 | 192 | ]; |
193 | | - /** @var string $result */ |
| 193 | + /** @var int $result */ |
194 | 194 | $result = $this->_webApiCall($serviceInfo, ['sku' => $productSku, 'option' => $option]); |
195 | | - echo "-------------------->>>>>>>".$result; |
196 | | - $arr = explode("ooo", $result); |
197 | | - $this->assertEquals('configurable', $arr[1]); |
198 | | - $productRepository1 = Bootstrap::getObjectManager()->create(ProductRepository::class); |
199 | | - $updatedproduct = $productRepository1->get($productSku); |
| 195 | + $this->assertGreaterThan(0, $result); |
| 196 | + $updatedproductRepo = Bootstrap::getObjectManager()->create(ProductRepository::class); |
| 197 | + $updatedproduct = $updatedproductRepo->get($productSku); |
200 | 198 | $this->assertEquals('configurable', $updatedproduct->getTypeId()); |
201 | | - //$this->assertGreaterThan(0, $result); |
202 | 199 | } |
203 | 200 |
|
204 | 201 | /** |
|
0 commit comments