Skip to content

Commit

Permalink
Merge branch '2.4-develop' of http://github.com/magento/magento2 into…
Browse files Browse the repository at this point in the history
… compare-remove-product-issue
  • Loading branch information
engcom-Echo committed Jun 9, 2020
2 parents 221ef59 + bb176b8 commit a93a105
Show file tree
Hide file tree
Showing 13,991 changed files with 200,886 additions and 448,229 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 10 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Fields marked with (*) are required. Please don't remove the template.

### Preconditions (*)
<!---
Provide the exact Magento version (example: 2.3.2) and any important information on the environment where bug is reproducible.
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
-->
1.
2.
Expand All @@ -32,3 +32,12 @@ Important: Provide a set of clear steps to reproduce this bug. We can not provid
<!--- Tell us what happened instead. Include error messages and issues. -->
1. [Screenshots, logs or description]
2.

---
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users without workaround._
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/developer-experience-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ Fields marked with (*) are required. Please don't remove the template.

### Proposed solution
<!--- Suggest your potential solutions for this issue. -->

---
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users with no workaround._
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: GraphQL Story
about: User story for GraphQL project
labels: 'Project: GraphQL'

---

*As a ___ I want to ___ so that ___.*

### AC
* a
* b
### Approved Schema
* a
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
-->
1. magento/magento2#<issue_number>: Issue title
1. Fixes magento/magento2#<issue_number>

### Manual testing scenarios (*)
<!---
Expand Down
3 changes: 0 additions & 3 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

$finder = PhpCsFixer\Finder::create()
->name('*.phtml')
->exclude('dev/tests/functional/generated')
->exclude('dev/tests/functional/var')
->exclude('dev/tests/functional/vendor')
->exclude('dev/tests/integration/tmp')
->exclude('dev/tests/integration/var')
->exclude('lib/internal/Cm')
Expand Down
68 changes: 0 additions & 68 deletions .travis.yml.sample

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,43 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\AdminAnalytics\Test\Unit\Condition;

use Magento\AdminAnalytics\Model\Condition\CanViewNotification;
use Magento\AdminAnalytics\Model\ResourceModel\Viewer\Logger;
use Magento\AdminAnalytics\Model\Viewer\Log;
use Magento\Framework\App\CacheInterface;
use Magento\Framework\App\ProductMetadataInterface;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\Framework\App\CacheInterface;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

/**
* Class CanViewNotificationTest
*/
class CanViewNotificationTest extends \PHPUnit\Framework\TestCase
class CanViewNotificationTest extends TestCase
{
/** @var CanViewNotification */
private $canViewNotification;

/** @var Logger|\PHPUnit_Framework_MockObject_MockObject */
/** @var Logger|MockObject */
private $viewerLoggerMock;

/** @var ProductMetadataInterface|\PHPUnit_Framework_MockObject_MockObject */
/** @var ProductMetadataInterface|MockObject */
private $productMetadataMock;

/** @var Log|\PHPUnit_Framework_MockObject_MockObject */
/** @var Log|MockObject */
private $logMock;

/** @var $cacheStorageMock \PHPUnit_Framework_MockObject_MockObject|CacheInterface */
/** @var MockObject|CacheInterface $cacheStorageMock */
private $cacheStorageMock;

public function setUp()
protected function setUp(): void
{
$this->cacheStorageMock = $this->getMockBuilder(CacheInterface::class)
->getMockForAbstractClass();
$this->logMock = $this->getMockBuilder(Log::class)
->getMock();
$this->viewerLoggerMock = $this->getMockBuilder(Logger::class)
->disableOriginalConstructor()
->getMock();
$this->productMetadataMock = $this->getMockBuilder(ProductMetadataInterface::class)
->disableOriginalConstructor()
->getMock();
$this->logMock = $this->createMock(Log::class);
$this->viewerLoggerMock = $this->createMock(Logger::class);
$this->productMetadataMock = $this->getMockForAbstractClass(ProductMetadataInterface::class);
$objectManager = new ObjectManager($this);
$this->canViewNotification = $objectManager->getObject(
CanViewNotification::class,
Expand Down
15 changes: 7 additions & 8 deletions app/code/Magento/AdminAnalytics/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sort-packages": true
},
"require": {
"php": "~7.1.3||~7.2.0||~7.3.0",
"php": "~7.3.0||~7.4.0",
"magento/framework": "*",
"magento/module-backend": "*",
"magento/module-config": "*",
Expand All @@ -18,12 +18,11 @@
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Magento\\AdminAnalytics\\": ""
}
"files": [
"registration.php"
],
"psr-4": {
"Magento\\AdminAnalytics\\": ""
}
}
}

2 changes: 1 addition & 1 deletion app/code/Magento/AdminAnalytics/etc/db_schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="admin_analytics_usage_version_log" resource="default" engine="innodb"
comment="Admin Notification Viewer Log Table">
<column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
<column xsi:type="int" name="id" unsigned="true" nullable="false" identity="true"
comment="Log ID"/>
<column xsi:type="varchar" name="last_viewed_in_version" nullable="false" length="50"
comment="Viewer last viewed on product version"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,25 @@ class ActionsTest extends TestCase
*/
private $sut;

protected function setUp() : void
protected function setUp(): void
{
parent::setUp();

/** @var Escaper|MockObject $escaperMock */
$escaperMock = $this->getMockBuilder(Escaper::class)->disableOriginalConstructor()->getMock();
$escaperMock = $this->createMock(Escaper::class);
$escaperMock->expects($this->once())->method('escapeUrl')->willReturn('https://magento.com');

/** @var UrlInterface|MockObject $urlBuilder */
$urlBuilder = $this->getMockBuilder(UrlInterface::class)->getMock();
$urlBuilder = $this->getMockForAbstractClass(UrlInterface::class);
$urlBuilder->expects($this->once())->method('getUrl')->willReturn('http://magento.com');

/** @var Context|MockObject $contextMock */
$contextMock = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
$contextMock = $this->createMock(Context::class);
$contextMock->expects($this->once())->method('getEscaper')->willReturn($escaperMock);
$contextMock->expects($this->once())->method('getUrlBuilder')->willReturn($urlBuilder);

/** @var Data|MockObject $urlHelperMock */
$urlHelperMock = $this->getMockBuilder(Data::class)->disableOriginalConstructor()->getMock();
$urlHelperMock = $this->createMock(Data::class);
$urlHelperMock->expects($this->once())->method('getEncodedUrl')->willReturn('http://magento.com');

$this->sut = new Actions($contextMock, $urlHelperMock);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
namespace Magento\AdminNotification\Test\Unit\Block\Grid\Renderer;

use Magento\AdminNotification\Block\Grid\Renderer\Notice;
use Magento\Backend\Block\Context;
use Magento\Framework\DataObject;
use Magento\Framework\Escaper;
use Magento\Backend\Block\Context;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

Expand All @@ -27,16 +27,16 @@ class NoticeTest extends TestCase
*/
private $sut;

protected function setUp() : void
protected function setUp(): void
{
parent::setUp();

/** @var Escaper|MockObject $escaperMock */
$escaperMock = $this->getMockBuilder(Escaper::class)->disableOriginalConstructor()->getMock();
$escaperMock = $this->createMock(Escaper::class);
$escaperMock->expects($this->exactly(2))->method('escapeHtml')->willReturn('<div>Some random html</div>');

/** @var Context|MockObject $contextMock */
$contextMock = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
$contextMock = $this->createMock(Context::class);
$contextMock->expects($this->once())->method('getEscaper')->willReturn($escaperMock);

$this->sut = new Notice($contextMock);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Magento\Backend\Block\Context;
use Magento\Backend\Block\Widget\Grid\Column;
use Magento\Framework\DataObject;
use Magento\Framework\Escaper;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

Expand All @@ -29,15 +28,15 @@ class SeverityTest extends TestCase
*/
private $sut;

protected function setUp() : void
protected function setUp(): void
{
parent::setUp();

/** @var Inbox|MockObject $inboxMock */
$inboxMock = $this->getMockBuilder(Inbox::class)->disableOriginalConstructor()->getMock();
$inboxMock = $this->createMock(Inbox::class);

/** @var Context|MockObject $contextMock */
$contextMock = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
$contextMock = $this->createMock(Context::class);

$this->sut = new Severity($contextMock, $inboxMock);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

/**
* Test class for \Magento\AdminNotification\Block\ToolbarEntry
Expand Down Expand Up @@ -30,7 +31,7 @@ protected function _getBlockInstance($unreadNotifications)
Unread::class,
['getSize', 'setCurPage', 'setPageSize']
);
$notificationList->expects($this->any())->method('getSize')->will($this->returnValue($unreadNotifications));
$notificationList->method('getSize')->willReturn($unreadNotifications);

$block = $objectManagerHelper->getObject(
ToolbarEntry::class,
Expand All @@ -52,9 +53,7 @@ public function testGetLatestUnreadNotifications()
$helper = new ObjectManager($this);

// 1. Create mocks
$notificationList = $this->getMockBuilder(Unread::class)
->disableOriginalConstructor()
->getMock();
$notificationList = $this->createMock(Unread::class);

/** @var ToolbarEntry $model */
$model = $helper->getObject(
Expand All @@ -65,8 +64,7 @@ public function testGetLatestUnreadNotifications()
// 2. Set expectations
$notificationList->expects($this->atLeastOnce())
->method('setPageSize')
->with(ToolbarEntry::NOTIFICATIONS_NUMBER)
->will($this->returnSelf());
->with(ToolbarEntry::NOTIFICATIONS_NUMBER)->willReturnSelf();

// 3. Run tested method
$result = $model->getLatestUnreadNotifications();
Expand Down
Loading

0 comments on commit a93a105

Please sign in to comment.