Skip to content

Commit 64bdaf3

Browse files
committed
MC-20682: Storefront: Add/remove product from other storeviews and websites
1 parent 464d93c commit 64bdaf3

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Controller/Product/ViewTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use Magento\Catalog\Model\Product;
1414
use Magento\Catalog\Model\Product\Visibility;
1515
use Magento\Eav\Model\Entity\Type;
16-
use Magento\Framework\Api\SearchCriteriaBuilder;
1716
use Magento\Framework\Api\SortOrderBuilder;
1817
use Magento\Framework\App\Http;
1918
use Magento\Framework\Registry;
@@ -66,9 +65,6 @@ class ViewTest extends AbstractController
6665
/** @var SortOrderBuilder */
6766
private $sortOrderBuilder;
6867

69-
/** @var SearchCriteriaBuilder */
70-
private $searchCriteriaBuilder;
71-
7268
/** @var GetAttributeSetByName */
7369
private $getAttributeSetByName;
7470

@@ -87,7 +83,6 @@ protected function setUp()
8783
$this->registry = $this->_objectManager->get(Registry::class);
8884
$this->storeManager = $this->_objectManager->get(StoreManagerInterface::class);
8985
$this->sortOrderBuilder = $this->_objectManager->create(SortOrderBuilder::class);
90-
$this->searchCriteriaBuilder = $this->_objectManager->get(SearchCriteriaBuilder::class);
9186
$this->getAttributeSetByName = $this->_objectManager->get(GetAttributeSetByName::class);
9287
}
9388

dev/tests/integration/testsuite/Magento/Catalog/_files/product_multistore_different_short_description.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
$product = $productFactory->create();
2727
$product->setTypeId(Type::TYPE_SIMPLE)
28-
->setAttributeSetId(4)
29-
->setWebsiteIds([1])
28+
->setAttributeSetId($product->getDefaultAttributeSetId())
29+
->setWebsiteIds([$storeManager->getWebsite(true)->getId()])
3030
->setName('Simple Product One')
3131
->setSku('simple-different-short-description')
3232
->setPrice(10)

dev/tests/integration/testsuite/Magento/Catalog/_files/product_two_websites.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
$product = $productFactory->create();
2929
$product->setTypeId(Type::TYPE_SIMPLE)
30-
->setAttributeSetId(4)
30+
->setAttributeSetId($product->getDefaultAttributeSetId())
3131
->setWebsiteIds([$defaultWebsiteId, $websiteId])
3232
->setName('Simple Product on two websites')
3333
->setSku('simple-on-two-websites')

0 commit comments

Comments
 (0)