File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
dev/tests/integration/testsuite/Magento Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 17
17
use Magento \TestFramework \Helper \Bootstrap ;
18
18
use Magento \TestFramework \Workaround \Override \Fixture \Resolver ;
19
19
20
-
21
20
Resolver::getInstance ()->requireDataFixture ('Magento/Customer/_files/customer.php ' );
22
21
Resolver::getInstance ()->requireDataFixture ('Magento/Customer/_files/customer_address.php ' );
23
22
Resolver::getInstance ()->requireDataFixture ('Magento/Catalog/_files/simple_products_not_visible_individually.php ' );
Original file line number Diff line number Diff line change 7
7
8
8
9
9
use Magento \Catalog \Api \ProductRepositoryInterface ;
10
+ use Magento \Customer \Api \CustomerRepositoryInterface ;
10
11
use Magento \TestFramework \Helper \Bootstrap ;
11
12
use Magento \Wishlist \Model \ResourceModel \Wishlist as WishlistResource ;
12
13
use Magento \Wishlist \Model \Wishlist ;
21
22
$ wishListResource = $ objectManager ->get (WishlistResource::class);
22
23
/** @var Wishlist $wishlist */
23
24
$ wishlist = $ objectManager ->get (WishlistFactory::class)->create ();
25
+ /** @var CustomerRepositoryInterface $customerRepository */
26
+ $ customerRepository = $ objectManager ->get (CustomerRepositoryInterface::class);
27
+ $ customer = $ customerRepository ->get ('customer@example.com ' );
24
28
/** @var ProductRepositoryInterface $productRepository */
25
29
$ productRepository = $ objectManager ->get (ProductRepositoryInterface::class);
26
30
$ productRepository ->cleanCache ();
Original file line number Diff line number Diff line change 7
7
8
8
9
9
use Magento \Catalog \Api \ProductRepositoryInterface ;
10
+ use Magento \Customer \Api \CustomerRepositoryInterface ;
10
11
use Magento \TestFramework \Helper \Bootstrap ;
11
12
use Magento \Wishlist \Model \ResourceModel \Wishlist as WishlistResource ;
12
13
use Magento \Wishlist \Model \Wishlist ;
24
25
/** @var ProductRepositoryInterface $productRepository */
25
26
$ productRepository = $ objectManager ->get (ProductRepositoryInterface::class);
26
27
$ productRepository ->cleanCache ();
28
+ /** @var CustomerRepositoryInterface $customerRepository */
29
+ $ customerRepository = $ objectManager ->get (CustomerRepositoryInterface::class);
30
+ $ customer = $ customerRepository ->get ('customer@example.com ' );
27
31
$ product = $ productRepository ->get ('simple_not_visible_1 ' );
28
32
$ wishList ->loadByCustomerId ($ customer ->getId (), true );
29
33
$ item = $ wishList ->addNewItem ($ product );
You can’t perform that action at this time.
0 commit comments