File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
dev/tests/integration/testsuite/Magento/Catalog Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 13
13
use Magento \Catalog \Model \Product ;
14
14
use Magento \Catalog \Model \Product \Visibility ;
15
15
use Magento \Eav \Model \Entity \Type ;
16
- use Magento \Framework \Api \SearchCriteriaBuilder ;
17
16
use Magento \Framework \Api \SortOrderBuilder ;
18
17
use Magento \Framework \App \Http ;
19
18
use Magento \Framework \Registry ;
@@ -66,9 +65,6 @@ class ViewTest extends AbstractController
66
65
/** @var SortOrderBuilder */
67
66
private $ sortOrderBuilder ;
68
67
69
- /** @var SearchCriteriaBuilder */
70
- private $ searchCriteriaBuilder ;
71
-
72
68
/** @var GetAttributeSetByName */
73
69
private $ getAttributeSetByName ;
74
70
@@ -87,7 +83,6 @@ protected function setUp()
87
83
$ this ->registry = $ this ->_objectManager ->get (Registry::class);
88
84
$ this ->storeManager = $ this ->_objectManager ->get (StoreManagerInterface::class);
89
85
$ this ->sortOrderBuilder = $ this ->_objectManager ->create (SortOrderBuilder::class);
90
- $ this ->searchCriteriaBuilder = $ this ->_objectManager ->get (SearchCriteriaBuilder::class);
91
86
$ this ->getAttributeSetByName = $ this ->_objectManager ->get (GetAttributeSetByName::class);
92
87
}
93
88
Original file line number Diff line number Diff line change 25
25
26
26
$ product = $ productFactory ->create ();
27
27
$ product ->setTypeId (Type::TYPE_SIMPLE )
28
- ->setAttributeSetId (4 )
29
- ->setWebsiteIds ([1 ])
28
+ ->setAttributeSetId ($ product -> getDefaultAttributeSetId () )
29
+ ->setWebsiteIds ([$ storeManager -> getWebsite ( true )-> getId () ])
30
30
->setName ('Simple Product One ' )
31
31
->setSku ('simple-different-short-description ' )
32
32
->setPrice (10 )
Original file line number Diff line number Diff line change 27
27
28
28
$ product = $ productFactory ->create ();
29
29
$ product ->setTypeId (Type::TYPE_SIMPLE )
30
- ->setAttributeSetId (4 )
30
+ ->setAttributeSetId ($ product -> getDefaultAttributeSetId () )
31
31
->setWebsiteIds ([$ defaultWebsiteId , $ websiteId ])
32
32
->setName ('Simple Product on two websites ' )
33
33
->setSku ('simple-on-two-websites ' )
You can’t perform that action at this time.
0 commit comments