Skip to content

Commit 84e14f7

Browse files
committed
Merge remote-tracking branch 'origin/AC1536' into gl_pr_jan13_2022
2 parents 4cc59ff + 04d8f12 commit 84e14f7

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

app/code/Magento/Customer/Observer/UpgradeOrderCustomerEmailObserver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function execute(Observer $observer): void
6666
}
6767
$searchCriteria = $this->searchCriteriaBuilder
6868
->addFilter(OrderInterface::CUSTOMER_ID, $customer->getId())
69+
->addFilter(OrderInterface::CUSTOMER_EMAIL, $originalCustomer->getEmail())
6970
->create();
7071

7172
/**

app/code/Magento/Customer/Test/Unit/Observer/UpgradeOrderCustomerEmailObserverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ private function setOriginalCustomerToEventMock(MockObject $originalCustomer): v
171171

172172
private function setCustomerEmail(MockObject $originalCustomer, string $email): void
173173
{
174-
$originalCustomer->expects($this->once())
174+
$originalCustomer->expects($this->any())
175175
->method('getEmail')
176176
->willReturn($email);
177177
}
@@ -186,7 +186,7 @@ private function whenOrderRepositoryGetListIsCalled(MockObject $orderCollectionM
186186
->method('create')
187187
->willReturn($searchCriteriaMock);
188188

189-
$this->searchCriteriaBuilderMock->expects($this->once())
189+
$this->searchCriteriaBuilderMock->expects($this->any())
190190
->method('addFilter')
191191
->willReturn($this->searchCriteriaBuilderMock);
192192

dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderGetTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
class OrderGetTest extends WebapiAbstract
1818
{
19-
const RESOURCE_PATH = '/V1/orders';
19+
private const RESOURCE_PATH = '/V1/orders';
2020

21-
const SERVICE_READ_NAME = 'salesOrderRepositoryV1';
21+
private const SERVICE_READ_NAME = 'salesOrderRepositoryV1';
2222

23-
const SERVICE_VERSION = 'V1';
23+
private const SERVICE_VERSION = 'V1';
2424

25-
const ORDER_INCREMENT_ID = '100000001';
25+
private const ORDER_INCREMENT_ID = '100000001';
2626

2727
/**
2828
* @var ObjectManagerInterface
@@ -74,7 +74,7 @@ public function testOrderGet(): void
7474
$expectedShippingAddress = [
7575
'address_type' => 'shipping',
7676
'city' => 'Los Angeles',
77-
'email' => 'customer@null.com',
77+
'email' => 'customer@example.com',
7878
'postcode' => '11111',
7979
'region' => 'CA'
8080
];

dev/tests/integration/testsuite/Magento/Customer/Model/ResourceModel/CustomerRepositoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
*/
4040
class CustomerRepositoryTest extends \PHPUnit\Framework\TestCase
4141
{
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;
4444

4545
/** @var AccountManagementInterface */
4646
private $accountManagement;
@@ -685,7 +685,7 @@ public function testUpgradeOrderCustomerEmailObserverWhenEmailIsNotModified(): v
685685
$customerOrders = $this->orderRepository->getList($searchCriteria);
686686

687687
foreach ($customerOrders as $customerOrder) {
688-
$this->assertEquals('customer@null.com', $customerOrder->getCustomerEmail());
688+
$this->assertEquals('customer@example.com', $customerOrder->getCustomerEmail());
689689
}
690690
}
691691
}

dev/tests/integration/testsuite/Magento/Sales/Controller/Guest/FormTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function login($customerId)
9191
private function prepareRequestData($invalidData = false)
9292
{
9393
$orderId = 100000001;
94-
$email = $invalidData ? 'wrong@example.com' : 'customer@null.com';
94+
$email = $invalidData ? 'wrong@example.com' : 'customer@example.com';
9595

9696
/** @var FormKey $formKey */
9797
$formKey = $this->_objectManager->get(FormKey::class);

dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/CreditmemoSenderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
class CreditmemoSenderTest extends TestCase
2020
{
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';
2424

2525
/**
2626
* @var CustomerRepository

dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/InvoiceSenderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
*/
2929
class InvoiceSenderTest extends TestCase
3030
{
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';
3434

3535
/** @var ObjectManagerInterface */
3636
private $objectManager;

dev/tests/integration/testsuite/Magento/Sales/Model/Order/Email/Sender/ShipmentSenderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
*/
2222
class ShipmentSenderTest extends \PHPUnit\Framework\TestCase
2323
{
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';
2727

2828
/**
2929
* @var CustomerRepository

dev/tests/integration/testsuite/Magento/Sales/_files/order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
->setOrderCurrencyCode('USD')
6565
->setBaseCurrencyCode('USD')
6666
->setCustomerIsGuest(true)
67-
->setCustomerEmail('customer@null.com')
67+
->setCustomerEmail('customer@example.com')
6868
->setBillingAddress($billingAddress)
6969
->setShippingAddress($shippingAddress)
7070
->setStoreId($objectManager->get(StoreManagerInterface::class)->getStore()->getId())

0 commit comments

Comments
 (0)