File tree Expand file tree Collapse file tree 9 files changed +22
-21
lines changed
app/code/Magento/Customer
api-functional/testsuite/Magento/Sales/Service/V1
integration/testsuite/Magento
Customer/Model/ResourceModel Expand file tree Collapse file tree 9 files changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ public function execute(Observer $observer): void
66
66
}
67
67
$ searchCriteria = $ this ->searchCriteriaBuilder
68
68
->addFilter (OrderInterface::CUSTOMER_ID , $ customer ->getId ())
69
+ ->addFilter (OrderInterface::CUSTOMER_EMAIL , $ originalCustomer ->getEmail ())
69
70
->create ();
70
71
71
72
/**
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ private function setOriginalCustomerToEventMock(MockObject $originalCustomer): v
171
171
172
172
private function setCustomerEmail (MockObject $ originalCustomer , string $ email ): void
173
173
{
174
- $ originalCustomer ->expects ($ this ->once ())
174
+ $ originalCustomer ->expects ($ this ->any ())
175
175
->method ('getEmail ' )
176
176
->willReturn ($ email );
177
177
}
@@ -186,7 +186,7 @@ private function whenOrderRepositoryGetListIsCalled(MockObject $orderCollectionM
186
186
->method ('create ' )
187
187
->willReturn ($ searchCriteriaMock );
188
188
189
- $ this ->searchCriteriaBuilderMock ->expects ($ this ->once ())
189
+ $ this ->searchCriteriaBuilderMock ->expects ($ this ->any ())
190
190
->method ('addFilter ' )
191
191
->willReturn ($ this ->searchCriteriaBuilderMock );
192
192
Original file line number Diff line number Diff line change 16
16
17
17
class OrderGetTest extends WebapiAbstract
18
18
{
19
- const RESOURCE_PATH = '/V1/orders ' ;
19
+ private const RESOURCE_PATH = '/V1/orders ' ;
20
20
21
- const SERVICE_READ_NAME = 'salesOrderRepositoryV1 ' ;
21
+ private const SERVICE_READ_NAME = 'salesOrderRepositoryV1 ' ;
22
22
23
- const SERVICE_VERSION = 'V1 ' ;
23
+ private const SERVICE_VERSION = 'V1 ' ;
24
24
25
- const ORDER_INCREMENT_ID = '100000001 ' ;
25
+ private const ORDER_INCREMENT_ID = '100000001 ' ;
26
26
27
27
/**
28
28
* @var ObjectManagerInterface
@@ -74,7 +74,7 @@ public function testOrderGet(): void
74
74
$ expectedShippingAddress = [
75
75
'address_type ' => 'shipping ' ,
76
76
'city ' => 'Los Angeles ' ,
77
- 'email ' => 'customer@null .com ' ,
77
+ 'email ' => 'customer@example .com ' ,
78
78
'postcode ' => '11111 ' ,
79
79
'region ' => 'CA '
80
80
];
Original file line number Diff line number Diff line change 39
39
*/
40
40
class CustomerRepositoryTest extends \PHPUnit \Framework \TestCase
41
41
{
42
- const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
43
- const CUSTOMER_ID = 1 ;
42
+ private const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
43
+ private const CUSTOMER_ID = 1 ;
44
44
45
45
/** @var AccountManagementInterface */
46
46
private $ accountManagement ;
@@ -685,7 +685,7 @@ public function testUpgradeOrderCustomerEmailObserverWhenEmailIsNotModified(): v
685
685
$ customerOrders = $ this ->orderRepository ->getList ($ searchCriteria );
686
686
687
687
foreach ($ customerOrders as $ customerOrder ) {
688
- $ this ->assertEquals ('customer@null .com ' , $ customerOrder ->getCustomerEmail ());
688
+ $ this ->assertEquals ('customer@example .com ' , $ customerOrder ->getCustomerEmail ());
689
689
}
690
690
}
691
691
}
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ protected function login($customerId)
91
91
private function prepareRequestData ($ invalidData = false )
92
92
{
93
93
$ orderId = 100000001 ;
94
- $ email = $ invalidData ? 'wrong@example.com ' : 'customer@null .com ' ;
94
+ $ email = $ invalidData ? 'wrong@example.com ' : 'customer@example .com ' ;
95
95
96
96
/** @var FormKey $formKey */
97
97
$ formKey = $ this ->_objectManager ->get (FormKey::class);
Original file line number Diff line number Diff line change 18
18
19
19
class CreditmemoSenderTest extends TestCase
20
20
{
21
- const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
22
- const OLD_CUSTOMER_EMAIL = 'customer@null .com ' ;
23
- const ORDER_EMAIL = 'customer@null .com ' ;
21
+ private const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
22
+ private const OLD_CUSTOMER_EMAIL = 'customer@example .com ' ;
23
+ private const ORDER_EMAIL = 'customer@example .com ' ;
24
24
25
25
/**
26
26
* @var CustomerRepository
Original file line number Diff line number Diff line change 28
28
*/
29
29
class InvoiceSenderTest extends TestCase
30
30
{
31
- const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
32
- const OLD_CUSTOMER_EMAIL = 'customer@null .com ' ;
33
- const ORDER_EMAIL = 'customer@null .com ' ;
31
+ private const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
32
+ private const OLD_CUSTOMER_EMAIL = 'customer@example .com ' ;
33
+ private const ORDER_EMAIL = 'customer@example .com ' ;
34
34
35
35
/** @var ObjectManagerInterface */
36
36
private $ objectManager ;
Original file line number Diff line number Diff line change 21
21
*/
22
22
class ShipmentSenderTest extends \PHPUnit \Framework \TestCase
23
23
{
24
- const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
25
- const OLD_CUSTOMER_EMAIL = 'customer@null .com ' ;
26
- const ORDER_EMAIL = 'customer@null .com ' ;
24
+ private const NEW_CUSTOMER_EMAIL = 'new.customer@example.com ' ;
25
+ private const OLD_CUSTOMER_EMAIL = 'customer@example .com ' ;
26
+ private const ORDER_EMAIL = 'customer@example .com ' ;
27
27
28
28
/**
29
29
* @var CustomerRepository
Original file line number Diff line number Diff line change 64
64
->setOrderCurrencyCode ('USD ' )
65
65
->setBaseCurrencyCode ('USD ' )
66
66
->setCustomerIsGuest (true )
67
- ->setCustomerEmail ('customer@null .com ' )
67
+ ->setCustomerEmail ('customer@example .com ' )
68
68
->setBillingAddress ($ billingAddress )
69
69
->setShippingAddress ($ shippingAddress )
70
70
->setStoreId ($ objectManager ->get (StoreManagerInterface::class)->getStore ()->getId ())
You can’t perform that action at this time.
0 commit comments