Skip to content

Commit 5a4a874

Browse files
authored
Merge branch '2.4-develop' into 2.4-develop-PR-yogesh-2
2 parents cb03de4 + d69c242 commit 5a4a874

File tree

2,719 files changed

+60080
-52180
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,719 files changed

+60080
-52180
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If you are a new GitHub user, we recommend that you create your own [free github
3131
This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
3232

3333
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
34-
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
34+
2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing.
3535
3. Create and test your work.
3636
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#pull_request).
3737
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.

app/code/Magento/AdminAnalytics/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="LoginAdminWithCredentialsActionGroup" deprecated="Use AdminLoginActionGroup instead">
11+
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/>
12+
</actionGroup>
13+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="LoginAsAdmin" deprecated="Use AdminLoginActionGroup instead">
11+
<conditionalClick selector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" dependentSelector="{{AdminUsageNotificationSection.adminUsageDontAllowButton}}" visible="true" stepKey="clickDontAllowButtonIfVisible" before="closeAdminNotification"/>
12+
</actionGroup>
13+
</actionGroups>

app/code/Magento/AdminAnalytics/Test/Mftf/Test/TrackingScriptTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
</annotations>
2222

2323
<!-- Logging in Magento admin -->
24-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2525
</test>
2626
</tests>

app/code/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationNavigateMenuTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<group value="mtf_migrated"/>
2121
</annotations>
2222
<before>
23-
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/>
23+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
2424
</before>
2525
<after>
2626
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Magento\Framework\Escaper;
1919
use Magento\Framework\Url\Helper\Data;
2020
use Magento\Framework\UrlInterface;
21+
use PHPUnit\Framework\MockObject\MockObject;
2122
use PHPUnit\Framework\TestCase;
2223

2324
class ActionsTest extends TestCase
@@ -32,20 +33,20 @@ protected function setUp() : void
3233
{
3334
parent::setUp();
3435

35-
/** @var Escaper | \PHPUnit_Framework_MockObject_MockObject $escaperMock */
36+
/** @var Escaper|MockObject $escaperMock */
3637
$escaperMock = $this->getMockBuilder(Escaper::class)->disableOriginalConstructor()->getMock();
3738
$escaperMock->expects($this->once())->method('escapeUrl')->willReturn('https://magento.com');
3839

39-
/** @var UrlInterface | \PHPUnit_Framework_MockObject_MockObject $urlBuilder */
40+
/** @var UrlInterface|MockObject $urlBuilder */
4041
$urlBuilder = $this->getMockBuilder(UrlInterface::class)->getMock();
4142
$urlBuilder->expects($this->once())->method('getUrl')->willReturn('http://magento.com');
4243

43-
/** @var Context | \PHPUnit_Framework_MockObject_MockObject $contextMock */
44+
/** @var Context|MockObject $contextMock */
4445
$contextMock = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
4546
$contextMock->expects($this->once())->method('getEscaper')->willReturn($escaperMock);
4647
$contextMock->expects($this->once())->method('getUrlBuilder')->willReturn($urlBuilder);
4748

48-
/** @var Data | \PHPUnit_Framework_MockObject_MockObject $urlHelperMock */
49+
/** @var Data|MockObject $urlHelperMock */
4950
$urlHelperMock = $this->getMockBuilder(Data::class)->disableOriginalConstructor()->getMock();
5051
$urlHelperMock->expects($this->once())->method('getEncodedUrl')->willReturn('http://magento.com');
5152

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Magento\Framework\DataObject;
1616
use Magento\Framework\Escaper;
1717
use Magento\Backend\Block\Context;
18+
use PHPUnit\Framework\MockObject\MockObject;
1819
use PHPUnit\Framework\TestCase;
1920

2021
class NoticeTest extends TestCase
@@ -30,11 +31,11 @@ protected function setUp() : void
3031
{
3132
parent::setUp();
3233

33-
/** @var Escaper | \PHPUnit_Framework_MockObject_MockObject $escaperMock */
34+
/** @var Escaper|MockObject $escaperMock */
3435
$escaperMock = $this->getMockBuilder(Escaper::class)->disableOriginalConstructor()->getMock();
3536
$escaperMock->expects($this->exactly(2))->method('escapeHtml')->willReturn('<div>Some random html</div>');
3637

37-
/** @var Context | \PHPUnit_Framework_MockObject_MockObject $contextMock */
38+
/** @var Context|MockObject $contextMock */
3839
$contextMock = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
3940
$contextMock->expects($this->once())->method('getEscaper')->willReturn($escaperMock);
4041

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Magento\Backend\Block\Widget\Grid\Column;
1818
use Magento\Framework\DataObject;
1919
use Magento\Framework\Escaper;
20+
use PHPUnit\Framework\MockObject\MockObject;
2021
use PHPUnit\Framework\TestCase;
2122

2223
class SeverityTest extends TestCase
@@ -32,18 +33,18 @@ protected function setUp() : void
3233
{
3334
parent::setUp();
3435

35-
/** @var Inbox |\PHPUnit_Framework_MockObject_MockObject $inboxMock */
36+
/** @var Inbox|MockObject $inboxMock */
3637
$inboxMock = $this->getMockBuilder(Inbox::class)->disableOriginalConstructor()->getMock();
3738

38-
/** @var Context | \PHPUnit_Framework_MockObject_MockObject $contextMock */
39+
/** @var Context|MockObject $contextMock */
3940
$contextMock = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
4041

4142
$this->sut = new Severity($contextMock, $inboxMock);
4243
}
4344

4445
public function testShouldRenderSeverity() : void
4546
{
46-
/** @var Column | \PHPUnit_Framework_MockObject_MockObject $columnMock */
47+
/** @var Column|MockObject $columnMock */
4748
$columnMock = $this->getMockBuilder(Column::class)
4849
->disableOriginalConstructor()
4950
->setMethods(['getIndex'])

app/code/Magento/AdminNotification/Test/Unit/Block/ToolbarEntryTest.php

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,31 @@
99
*/
1010
namespace Magento\AdminNotification\Test\Unit\Block;
1111

12-
class ToolbarEntryTest extends \PHPUnit\Framework\TestCase
12+
use Magento\AdminNotification\Block\ToolbarEntry;
13+
use Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread;
14+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
15+
use PHPUnit\Framework\TestCase;
16+
17+
class ToolbarEntryTest extends TestCase
1318
{
1419
/**
1520
* Retrieve toolbar entry block instance
1621
*
1722
* @param int $unreadNotifications number of unread notifications
18-
* @return \Magento\AdminNotification\Block\ToolbarEntry
23+
* @return ToolbarEntry
1924
*/
2025
protected function _getBlockInstance($unreadNotifications)
2126
{
22-
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
27+
$objectManagerHelper = new ObjectManager($this);
2328
// mock collection of unread notifications
2429
$notificationList = $this->createPartialMock(
25-
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class,
30+
Unread::class,
2631
['getSize', 'setCurPage', 'setPageSize']
2732
);
2833
$notificationList->expects($this->any())->method('getSize')->will($this->returnValue($unreadNotifications));
2934

3035
$block = $objectManagerHelper->getObject(
31-
\Magento\AdminNotification\Block\ToolbarEntry::class,
36+
ToolbarEntry::class,
3237
['notificationList' => $notificationList]
3338
);
3439

@@ -44,25 +49,23 @@ public function testGetUnreadNotificationCount()
4449

4550
public function testGetLatestUnreadNotifications()
4651
{
47-
$helper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
52+
$helper = new ObjectManager($this);
4853

4954
// 1. Create mocks
50-
$notificationList = $this->getMockBuilder(
51-
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class
52-
)
55+
$notificationList = $this->getMockBuilder(Unread::class)
5356
->disableOriginalConstructor()
5457
->getMock();
5558

56-
/** @var \Magento\AdminNotification\Block\ToolbarEntry $model */
59+
/** @var ToolbarEntry $model */
5760
$model = $helper->getObject(
58-
\Magento\AdminNotification\Block\ToolbarEntry::class,
61+
ToolbarEntry::class,
5962
['notificationList' => $notificationList]
6063
);
6164

6265
// 2. Set expectations
6366
$notificationList->expects($this->atLeastOnce())
6467
->method('setPageSize')
65-
->with(\Magento\AdminNotification\Block\ToolbarEntry::NOTIFICATIONS_NUMBER)
68+
->with(ToolbarEntry::NOTIFICATIONS_NUMBER)
6669
->will($this->returnSelf());
6770

6871
// 3. Run tested method

0 commit comments

Comments
 (0)