Skip to content

Commit d93e8a9

Browse files
committed
MC-41093: [CE/EE] Fatal error during saving Simple Product by admin
1 parent 8b1ad1c commit d93e8a9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Save/DeleteCategoryTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
namespace Magento\Catalog\Controller\Adminhtml\Product\Save;
99

1010
use Magento\Catalog\Api\ProductRepositoryInterface;
11+
use Magento\Catalog\Model\Category;
1112
use Magento\Framework\App\Request\Http as HttpRequest;
1213
use Magento\Framework\Message\MessageInterface;
14+
use Magento\TestFramework\Helper\Bootstrap;
1315
use Magento\TestFramework\TestCase\AbstractBackendController;
1416

1517
/**
1618
* @magentoDbIsolation disabled
17-
* @magentoDataFixture Magento/Catalog/_files/category_product.php
1819
* @magentoAppArea adminhtml
1920
*/
2021
class DeleteCategoryTest extends AbstractBackendController
@@ -25,21 +26,21 @@ class DeleteCategoryTest extends AbstractBackendController
2526
private $productRepository;
2627

2728
/**
28-
* @inheritdoc
29+
* @inheritDoc
2930
*/
3031
protected function setUp(): void
3132
{
3233
parent::setUp();
3334
$this->productRepository = $this->_objectManager->get(ProductRepositoryInterface::class);
34-
3535
}
3636

3737
/**
3838
* Checks product saving with deleted category before reindex is done
39+
* @magentoDataFixture Magento/Catalog/_files/category_product.php
3940
*/
4041
public function testDeleteCustomOptionWithTypeField(): void
4142
{
42-
$category = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Catalog\Model\Category::class);
43+
$category = Bootstrap::getObjectManager()->create(Category::class);
4344
$category->load(333);
4445
$category->delete();
4546
$product = $this->productRepository->get('simple333');

0 commit comments

Comments
 (0)