File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
dev/tests/integration/testsuite/Magento/Catalog/_files Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 16
16
require __DIR__ . '/../../Store/_files/second_website_with_two_stores.php ' ;
17
17
18
18
$ objectManager = Bootstrap::getObjectManager ();
19
+ /** @var ProductFactory $productFactory */
19
20
$ productFactory = $ objectManager ->create (ProductFactory::class);
21
+ /** @var ProductRepositoryInterface $productRepository */
20
22
$ productRepository = $ objectManager ->create (ProductRepositoryInterface::class);
23
+ /** @var WebsiteRepositoryInterface $websiteRepository */
21
24
$ websiteRepository = $ objectManager ->create (WebsiteRepositoryInterface::class);
22
25
$ websiteId = $ websiteRepository ->get ('test ' )->getId ();
26
+ $ defaultWebsiteId = $ websiteRepository ->get ('base ' )->getId ();
23
27
24
28
$ product = $ productFactory ->create ();
25
29
$ product ->setTypeId (Type::TYPE_SIMPLE )
26
30
->setAttributeSetId (4 )
27
- ->setWebsiteIds ([1 , $ websiteId ])
31
+ ->setWebsiteIds ([$ defaultWebsiteId , $ websiteId ])
28
32
->setName ('Simple Product on two websites ' )
29
33
->setSku ('simple-on-two-websites ' )
30
34
->setPrice (10 )
You can’t perform that action at this time.
0 commit comments