|
8 | 8 | use Magento\Catalog\Api\ProductRepositoryInterface;
|
9 | 9 | use Magento\Catalog\Model\Product;
|
10 | 10 | use Magento\Catalog\Model\Product\Visibility;
|
| 11 | +use Magento\Catalog\Test\Fixture\Product as ProductFixture; |
11 | 12 | use Magento\Framework\ObjectManagerInterface;
|
12 | 13 | use Magento\Store\Model\Store;
|
13 | 14 | use Magento\Store\Model\StoreManagerInterface;
|
| 15 | +use Magento\Store\Test\Fixture\Group as GroupFixture; |
| 16 | +use Magento\Store\Test\Fixture\Store as StoreFixture; |
| 17 | +use Magento\Store\Test\Fixture\Website as WebsiteFixture; |
| 18 | +use Magento\TestFramework\Fixture\DataFixture; |
14 | 19 | use Magento\TestFramework\Fixture\DataFixtureStorage;
|
15 | 20 | use Magento\TestFramework\Fixture\DataFixtureStorageManager;
|
16 | 21 | use Magento\TestFramework\Helper\Bootstrap;
|
@@ -641,14 +646,12 @@ public function testChangeVisibilityLocalScope()
|
641 | 646 | }
|
642 | 647 | }
|
643 | 648 |
|
644 |
| - /** |
645 |
| - * phpcs:disable Generic.Files.LineLength.TooLong |
646 |
| - * @magentoDataFixture Magento\Store\Test\Fixture\Website as:website |
647 |
| - * @magentoDataFixture Magento\Store\Test\Fixture\Group with:{"website_id":"$website.id$"} as:store_group |
648 |
| - * @magentoDataFixture Magento\Store\Test\Fixture\Store with:{"store_group_id":"$store_group.id$"} as:store |
649 |
| - * @magentoDataFixture Magento\Catalog\Test\Fixture\Product with:{"sku":"simple1","website_ids":[1,"$website.id$"]} as:product |
650 |
| - * @magentoAppIsolation enabled |
651 |
| - */ |
| 649 | + #[ |
| 650 | + DataFixture(WebsiteFixture::class, as: 'website'), |
| 651 | + DataFixture(GroupFixture::class, ['website_id' => '$website.id$'], 'store_group'), |
| 652 | + DataFixture(StoreFixture::class, ['store_group_id' => '$store_group.id$'], 'store'), |
| 653 | + DataFixture(ProductFixture::class, ['sku' => 'simple1', 'website_ids' => [1,'$website.id$'], 'product']), |
| 654 | + ] |
652 | 655 | public function testRemoveProductFromAllWebsites(): void
|
653 | 656 | {
|
654 | 657 | $testStore1 = $this->storeManager->getStore('default');
|
|
0 commit comments