File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
dev/tests/integration/testsuite/Magento/Newsletter/Model Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,14 @@ public function testCustomerCreated()
63
63
->setFirstname ('Firstname ' )
64
64
->setLastname ('Lastname ' )
65
65
->setEmail ('customer_two@example.com ' );
66
- $ createdCustomer = $ this ->customerRepository ->save (
66
+ $ this ->customerRepository ->save (
67
67
$ customerDataObject ,
68
68
$ this ->accountManagement ->getPasswordHash ('password ' )
69
69
);
70
70
71
71
$ subscriber ->loadByEmail ('customer_two@example.com ' );
72
72
$ this ->assertTrue ($ subscriber ->isSubscribed ());
73
- $ this ->assertEquals (( int ) $ createdCustomer -> getId () , (int )$ subscriber ->getCustomerId ());
73
+ $ this ->assertEquals (0 , (int )$ subscriber ->getCustomerId ());
74
74
}
75
75
76
76
/**
Original file line number Diff line number Diff line change @@ -40,15 +40,13 @@ public function testLoadByCustomerDataWithCustomerId()
40
40
* @magentoDataFixture Magento/Newsletter/_files/subscribers.php
41
41
* @magentoDataFixture Magento/Customer/_files/two_customers.php
42
42
*/
43
- public function testLoadByCustomerDataWithoutCustomerId ()
43
+ public function testTryLoadByCustomerDataWithoutCustomerId ()
44
44
{
45
45
/** @var \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository */
46
46
$ customerRepository = Bootstrap::getObjectManager ()
47
47
->create (\Magento \Customer \Api \CustomerRepositoryInterface::class);
48
48
$ customerData = $ customerRepository ->getById (2 );
49
49
$ result = $ this ->_resourceModel ->loadByCustomerData ($ customerData );
50
-
51
- $ this ->assertEquals (0 , $ result ['customer_id ' ]);
52
- $ this ->assertEquals ('customer_two@example.com ' , $ result ['subscriber_email ' ]);
50
+ $ this ->assertEmpty ($ result );
53
51
}
54
52
}
You can’t perform that action at this time.
0 commit comments