Skip to content

Commit 0e43d40

Browse files
authored
Merge branch '2.4-develop' into 2.4-develop-prs
2 parents baec64e + c7bf0ba commit 0e43d40

File tree

13 files changed

+307
-26
lines changed

13 files changed

+307
-26
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductWithMediaThumbGallerySliderTest.xml

Lines changed: 272 additions & 0 deletions
Large diffs are not rendered by default.

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->atLeastOnce())
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->atLeastOnce())
190190
->method('addFilter')
191191
->willReturn($this->searchCriteriaBuilderMock);
192192

app/code/Magento/Ui/view/base/web/templates/grid/search/search.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
i18n: placeholder,
1414
attr: {
1515
id: index,
16-
placeholder: $t(placeholder)
16+
placeholder: $t(placeholder),
17+
'aria-label': $t(placeholder),
1718
},
1819
textInput: inputValue,
1920
hasFocus: focused,
2021
keyboard: {
2122
13: apply.bind($data, false),
2223
27: cancel
23-
}"/>
24+
}">
2425
<button class="action-submit" type="button" click="apply.bind($data, false)" attr="'aria-label': $t('Search')">
2526
<span translate="'Search'"></span>
2627
</button>

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/Webapi/Adapter/Rest.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public function __construct()
6161
}
6262

6363
/**
64-
* {@inheritdoc}
64+
* @inheritdoc
65+
*
6566
* @throws \LogicException
6667
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
6768
* @SuppressWarnings(PHPMD.NPathComplexity)
@@ -79,6 +80,7 @@ public function call($serviceInfo, $arguments = [], $storeCode = null, $integrat
7980
// we're always using JSON
8081
$authHeader = [];
8182
$restServiceInfo = $serviceInfo['rest'];
83+
$additionalHeaders = $restServiceInfo['headers'] ?? [];
8284
if (array_key_exists('token', $restServiceInfo)) {
8385
$authHeader = $oAuthClient->buildBearerTokenAuthorizationHeader($restServiceInfo['token']);
8486
} else {
@@ -90,7 +92,12 @@ public function call($serviceInfo, $arguments = [], $storeCode = null, $integrat
9092
$httpMethod
9193
);
9294
}
93-
$authHeader = array_merge($authHeader, ['Accept: application/json', 'Content-Type: application/json']);
95+
$authHeader = array_merge(
96+
$authHeader,
97+
['Accept: application/json', 'Content-Type: application/json'],
98+
$additionalHeaders
99+
);
100+
94101
switch ($httpMethod) {
95102
case Request::HTTP_METHOD_GET:
96103
$response = $this->restClient->get($resourcePath, [], $authHeader);

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;

0 commit comments

Comments
 (0)