Skip to content

Commit 488f3b9

Browse files
authored
Merge pull request #5658 from magento-trigger/MC-34039
[TR] MC-34039: Merge 2.4-develop into 2.4-develop-php74
2 parents 45af4db + 9ead590 commit 488f3b9

File tree

2,317 files changed

+19102
-9266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,317 files changed

+19102
-9266
lines changed

app/code/Magento/AdminAnalytics/Test/Unit/Condition/CanViewNotificationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function setUp(): void
3939
->getMockForAbstractClass();
4040
$this->logMock = $this->createMock(Log::class);
4141
$this->viewerLoggerMock = $this->createMock(Logger::class);
42-
$this->productMetadataMock = $this->createMock(ProductMetadataInterface::class);
42+
$this->productMetadataMock = $this->getMockForAbstractClass(ProductMetadataInterface::class);
4343
$objectManager = new ObjectManager($this);
4444
$this->canViewNotification = $objectManager->getObject(
4545
CanViewNotification::class,

app/code/Magento/AdminNotification/Test/Unit/Block/Grid/Renderer/ActionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function setUp(): void
3838
$escaperMock->expects($this->once())->method('escapeUrl')->willReturn('https://magento.com');
3939

4040
/** @var UrlInterface|MockObject $urlBuilder */
41-
$urlBuilder = $this->createMock(UrlInterface::class);
41+
$urlBuilder = $this->getMockForAbstractClass(UrlInterface::class);
4242
$urlBuilder->expects($this->once())->method('getUrl')->willReturn('http://magento.com');
4343

4444
/** @var Context|MockObject $contextMock */

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/CacheOutdatedTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class CacheOutdatedTest extends TestCase
3939

4040
protected function setUp(): void
4141
{
42-
$this->_authorizationMock = $this->createMock(AuthorizationInterface::class);
43-
$this->_urlInterfaceMock = $this->createMock(UrlInterface::class);
44-
$this->_cacheTypeListMock = $this->createMock(TypeListInterface::class);
42+
$this->_authorizationMock = $this->getMockForAbstractClass(AuthorizationInterface::class);
43+
$this->_urlInterfaceMock = $this->getMockForAbstractClass(UrlInterface::class);
44+
$this->_cacheTypeListMock = $this->getMockForAbstractClass(TypeListInterface::class);
4545

4646
$objectManagerHelper = new ObjectManager($this);
4747
$arguments = [

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/SecurityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class SecurityTest extends TestCase
4141
protected function setUp(): void
4242
{
4343
//Prepare objects for constructor
44-
$this->cacheMock = $this->createMock(CacheInterface::class);
45-
$this->scopeConfigMock = $this->createMock(ScopeConfigInterface::class);
44+
$this->cacheMock = $this->getMockForAbstractClass(CacheInterface::class);
45+
$this->scopeConfigMock = $this->getMockForAbstractClass(ScopeConfigInterface::class);
4646
$this->curlFactoryMock = $this->createPartialMock(
4747
CurlFactory::class,
4848
['create']

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ protected function setUp(): void
208208
$this->storeResolver = $this->createMock(
209209
StoreResolver::class
210210
);
211-
$this->groupRepository = $this->createMock(GroupRepositoryInterface::class);
211+
$this->groupRepository = $this->getMockForAbstractClass(GroupRepositoryInterface::class);
212212
$this->writer = $this->createPartialMock(
213213
AbstractAdapter::class,
214214
[

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public function testSaveAndReplaceAdvancedPricesAddRowErrorCall()
330330
];
331331
$this->dataSourceModel->expects($this->at(0))->method('getNextBunch')->willReturn($testBunch);
332332
$this->advancedPricing->expects($this->once())->method('validateRow')->willReturn(false);
333-
$this->advancedPricing->method('saveProductPrices')->will($this->returnSelf());
333+
$this->advancedPricing->method('saveProductPrices')->willReturnSelf();
334334

335335
$this->advancedPricing
336336
->expects($this->once())
@@ -538,7 +538,7 @@ public function testSaveAndReplaceAdvancedPricesReplaceBehaviourInternalCalls()
538538
AdvancedPricing::TABLE_TIER_PRICE
539539
]
540540
)
541-
->will($this->returnSelf());
541+
->willReturnSelf();
542542

543543
$this->invokeMethod($this->advancedPricing, 'saveAndReplaceAdvancedPrices');
544544
}
@@ -567,7 +567,7 @@ public function testDeleteAdvancedPricingFormListSkuToDelete()
567567
->method('deleteProductTierPrices')
568568
->withConsecutive(
569569
[$expectedSkuList, AdvancedPricing::TABLE_TIER_PRICE]
570-
)->will($this->returnSelf());
570+
)->willReturnSelf();
571571

572572
$this->advancedPricing->deleteAdvancedPricing();
573573
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFillSearchTermActionGroup">
12+
<annotations>
13+
<description>Fills the search terms form with sample data.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="searchQuery" type="string"/>
17+
<argument name="store" type="string"/>
18+
<argument name="redirectUrl" type="string"/>
19+
<argument name="suggestedTerms" type="string"/>
20+
</arguments>
21+
<!-- Fill form fields -->
22+
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.query_text}}" userInput="{{searchQuery}}" stepKey="fillFieldSearchQuery"/>
23+
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.store_id}}" userInput="{{store}}" stepKey="selectStoreView"/>
24+
<fillField selector="{{AdminSearchTermsPageFormFieldsSection.redirect}}" userInput="{{redirectUrl}}" stepKey="fillFieldRedirectUrl"/>
25+
<selectOption selector="{{AdminSearchTermsPageFormFieldsSection.display_in_terms}}" userInput="{{suggestedTerms}}" stepKey="selectSuggestedTerms" />
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenNewSearchTermsPageActionGroup">
12+
<annotations>
13+
<description>Navigate to search terms form page.</description>
14+
</annotations>
15+
<amOnPage url="{{AdminSearchTermsFormPage.url}}" stepKey="amOnSearchTermsForm"/>
16+
<waitForPageLoad stepKey="waitForPageLoad1"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSaveSearchTermActionGroup">
12+
<annotations>
13+
<description>Save a new search term from Magento admin.</description>
14+
</annotations>
15+
<!-- Click save action and verify success message -->
16+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveSearchButton"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Search/Test/Mftf/Data/ConfigData.xml renamed to app/code/Magento/AdvancedSearch/Test/Mftf/Data/SearchTermsData.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8+
89
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
10-
<entity name="SearchEngineMysqlConfigData">
11-
<data key="path">catalog/search/engine</data>
12-
<data key="scope_id">1</data>
13-
<data key="label">MySQL</data>
14-
<data key="value">mysql</data>
11+
<entity name="SearchTerms">
12+
<data key="searchQuery" unique="suffix">books</data>
13+
<data key="store">Default Store View</data>
14+
<data key="redirectUrl">http://sample.com</data>
15+
<data key="suggestedTerms">1</data>
1516
</entity>
1617
</entities>

0 commit comments

Comments
 (0)