Skip to content

Commit cdcd97e

Browse files
committed
MAGETWO-70866: Merge branch 'develop' of github.com:magento/magento2ce into MAGETWO-70866-PR-9401
2 parents b6af7fb + d48faba commit cdcd97e

File tree

9,607 files changed

+52259
-67266
lines changed

Some content is hidden

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

9,607 files changed

+52259
-67266
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/.metadata
44
/.project
55
/.settings
6+
/.vscode
67
atlassian*
78
/nbproject
89
/robots.txt

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ script:
5959
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
6060

6161
# The scripts for grunt/phpunit type tests
62-
- if [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
62+
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
63+
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
6364
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi

app/code/Magento/AdminNotification/Block/Grid/Renderer/Actions.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
namespace Magento\AdminNotification\Block\Grid\Renderer;
1010

11+
/**
12+
* Class \Magento\AdminNotification\Block\Grid\Renderer\Actions
13+
*
14+
*/
1115
class Actions extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1216
{
1317
/**

app/code/Magento/AdminNotification/Block/Grid/Renderer/Notice.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
*/
88
namespace Magento\AdminNotification\Block\Grid\Renderer;
99

10+
/**
11+
* Class \Magento\AdminNotification\Block\Grid\Renderer\Notice
12+
*
13+
*/
1014
class Notice extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1115
{
1216
/**

app/code/Magento/AdminNotification/Block/Grid/Renderer/Severity.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
use Magento\Framework\Notification\MessageInterface;
1111

12+
/**
13+
* Class \Magento\AdminNotification\Block\Grid\Renderer\Severity
14+
*
15+
*/
1216
class Severity extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1317
{
1418
/**

app/code/Magento/AdminNotification/Block/System/Messages.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
*/
66
namespace Magento\AdminNotification\Block\System;
77

8+
/**
9+
* Class \Magento\AdminNotification\Block\System\Messages
10+
*
11+
*/
812
class Messages extends \Magento\Backend\Block\Template
913
{
1014
/**

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Index.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;
88

9+
/**
10+
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\Index
11+
*
12+
*/
913
class Index extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1014
{
1115
/**

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MarkAsRead.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;
88

9+
/**
10+
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\MarkAsRead
11+
*
12+
*/
913
class MarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1014
{
1115
/**

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassMarkAsRead.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;
88

9+
/**
10+
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\MassMarkAsRead
11+
*
12+
*/
913
class MassMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1014
{
1115

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassRemove.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;
88

9+
/**
10+
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\MassRemove
11+
*
12+
*/
913
class MassRemove extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1014
{
1115

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/Remove.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\AdminNotification\Controller\Adminhtml\Notification;
88

9+
/**
10+
* Class \Magento\AdminNotification\Controller\Adminhtml\Notification\Remove
11+
*
12+
*/
913
class Remove extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1014
{
1115

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*/
77
namespace Magento\AdminNotification\Controller\Adminhtml\System\Message;
88

9+
/**
10+
* Class \Magento\AdminNotification\Controller\Adminhtml\System\Message\ListAction
11+
*
12+
*/
913
class ListAction extends \Magento\Backend\App\AbstractAction
1014
{
1115
/**

app/code/Magento/AdminNotification/Model/Inbox.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
/**
1313
* AdminNotification Inbox model
1414
*
15-
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox _getResource()
16-
* @method \Magento\AdminNotification\Model\ResourceModel\Inbox getResource()
1715
* @method int getSeverity()
1816
* @method \Magento\AdminNotification\Model\Inbox setSeverity(int $value)
1917
* @method string getDateAdded()

app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Magento\Store\Model\Store;
1010

1111
/**
12-
* @deprecated
12+
* @deprecated 100.1.0
1313
*/
1414
class Baseurl implements \Magento\Framework\Notification\MessageInterface
1515
{

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

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

12-
class ToolbarEntryTest extends \PHPUnit_Framework_TestCase
12+
class ToolbarEntryTest extends \PHPUnit\Framework\TestCase
1313
{
1414
/**
1515
* Retrieve toolbar entry block instance
@@ -21,12 +21,9 @@ protected function _getBlockInstance($unreadNotifications)
2121
{
2222
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
2323
// mock collection of unread notifications
24-
$notificationList = $this->getMock(
24+
$notificationList = $this->createPartialMock(
2525
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class,
26-
['getSize', 'setCurPage', 'setPageSize'],
27-
[],
28-
'',
29-
false
26+
['getSize', 'setCurPage', 'setPageSize']
3027
);
3128
$notificationList->expects($this->any())->method('getSize')->will($this->returnValue($unreadNotifications));
3229

app/code/Magento/AdminNotification/Test/Unit/Model/FeedTest.php

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
namespace Magento\AdminNotification\Test\Unit\Model;
88

9-
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
109
use Magento\Framework\Config\ConfigOptionsListConstants;
10+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1111

1212
/**
1313
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1414
*/
15-
class FeedTest extends \PHPUnit_Framework_TestCase
15+
class FeedTest extends \PHPUnit\Framework\TestCase
1616
{
1717
/** @var \Magento\AdminNotification\Model\Feed */
1818
protected $feed;
@@ -52,42 +52,27 @@ class FeedTest extends \PHPUnit_Framework_TestCase
5252

5353
protected function setUp()
5454
{
55-
$this->inboxFactory = $this->getMock(
55+
$this->inboxFactory = $this->createPartialMock(
5656
\Magento\AdminNotification\Model\InboxFactory::class,
57-
['create'],
58-
[],
59-
'',
60-
false
61-
);
62-
$this->curlFactory = $this->getMock(
63-
\Magento\Framework\HTTP\Adapter\CurlFactory::class,
64-
['create'],
65-
[],
66-
'',
67-
false
57+
['create']
6858
);
59+
$this->curlFactory = $this->createPartialMock(\Magento\Framework\HTTP\Adapter\CurlFactory::class, ['create']);
6960
$this->curl = $this->getMockBuilder(\Magento\Framework\HTTP\Adapter\Curl::class)
7061
->disableOriginalConstructor()->getMock();
71-
$this->appState = $this->getMock(\Magento\Framework\App\State::class, ['getInstallDate'], [], '', false);
72-
$this->inboxModel = $this->getMock(
73-
\Magento\AdminNotification\Model\Inbox::class,
74-
[
62+
$this->appState = $this->createPartialMock(\Magento\Framework\App\State::class, ['getInstallDate']);
63+
$this->inboxModel = $this->createPartialMock(\Magento\AdminNotification\Model\Inbox::class, [
7564
'__wakeup',
7665
'parse'
77-
],
78-
[],
79-
'',
80-
false
81-
);
82-
$this->backendConfig = $this->getMock(
66+
]);
67+
$this->backendConfig = $this->createPartialMock(
8368
\Magento\Backend\App\ConfigInterface::class,
8469
[
8570
'getValue',
8671
'setValue',
8772
'isSetFlag'
8873
]
8974
);
90-
$this->cacheManager = $this->getMock(
75+
$this->cacheManager = $this->createPartialMock(
9176
\Magento\Framework\App\CacheInterface::class,
9277
[
9378
'load',
@@ -106,7 +91,7 @@ protected function setUp()
10691
$this->productMetadata = $this->getMockBuilder(\Magento\Framework\App\ProductMetadata::class)
10792
->disableOriginalConstructor()->getMock();
10893

109-
$this->urlBuilder = $this->getMock(\Magento\Framework\UrlInterface::class);
94+
$this->urlBuilder = $this->createMock(\Magento\Framework\UrlInterface::class);
11095

11196
$this->feed = $this->objectManagerHelper->getObject(
11297
\Magento\AdminNotification\Model\Feed::class,

app/code/Magento/AdminNotification/Test/Unit/Model/NotificationServiceTest.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
namespace Magento\AdminNotification\Test\Unit\Model;
1111

12-
class NotificationServiceTest extends \PHPUnit_Framework_TestCase
12+
class NotificationServiceTest extends \PHPUnit\Framework\TestCase
1313
{
1414
/**
1515
* Retrieve instance of notification service model
@@ -23,19 +23,13 @@ protected function _getServiceInstanceForMarkAsReadTest($notificationId)
2323
* @var
2424
* $notificationFactory \PHPUnit_Framework_MockObject_MockObject|\Magento\AdminNotification\Model\InboxFactory
2525
*/
26-
$notificationFactory = $this->getMock(
26+
$notificationFactory = $this->createPartialMock(
2727
\Magento\AdminNotification\Model\InboxFactory::class,
28-
['create'],
29-
[],
30-
'',
31-
false
28+
['create']
3229
);
33-
$notification = $this->getMock(
30+
$notification = $this->createPartialMock(
3431
\Magento\AdminNotification\Model\Inbox::class,
35-
['load', 'getId', 'save', 'setIsRead', '__sleep', '__wakeup'],
36-
[],
37-
'',
38-
false
32+
['load', 'getId', 'save', 'setIsRead', '__sleep', '__wakeup']
3933
);
4034
$notification->expects($this->once())->method('load')->with($notificationId)->will($this->returnSelf());
4135
$notification->expects($this->once())->method('getId')->will($this->returnValue($notificationId));

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
namespace Magento\AdminNotification\Test\Unit\Model\System\Message;
77

8-
class CacheOutdatedTest extends \PHPUnit_Framework_TestCase
8+
class CacheOutdatedTest extends \PHPUnit\Framework\TestCase
99
{
1010
/**
1111
* @var \PHPUnit_Framework_MockObject_MockObject
@@ -29,9 +29,9 @@ class CacheOutdatedTest extends \PHPUnit_Framework_TestCase
2929

3030
protected function setUp()
3131
{
32-
$this->_authorizationMock = $this->getMock(\Magento\Framework\AuthorizationInterface::class);
33-
$this->_urlInterfaceMock = $this->getMock(\Magento\Framework\UrlInterface::class);
34-
$this->_cacheTypeListMock = $this->getMock(\Magento\Framework\App\Cache\TypeListInterface::class);
32+
$this->_authorizationMock = $this->createMock(\Magento\Framework\AuthorizationInterface::class);
33+
$this->_urlInterfaceMock = $this->createMock(\Magento\Framework\UrlInterface::class);
34+
$this->_cacheTypeListMock = $this->createMock(\Magento\Framework\App\Cache\TypeListInterface::class);
3535

3636
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
3737
$arguments = [
@@ -64,10 +64,10 @@ public function testGetIdentity($expectedSum, $cacheTypes)
6464

6565
public function getIdentityDataProvider()
6666
{
67-
$cacheTypeMock1 = $this->getMock(\stdClass::class, ['getCacheType']);
67+
$cacheTypeMock1 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
6868
$cacheTypeMock1->expects($this->any())->method('getCacheType')->will($this->returnValue('Simple'));
6969

70-
$cacheTypeMock2 = $this->getMock(\stdClass::class, ['getCacheType']);
70+
$cacheTypeMock2 = $this->createPartialMock(\stdClass::class, ['getCacheType']);
7171
$cacheTypeMock2->expects($this->any())->method('getCacheType')->will($this->returnValue('Advanced'));
7272

7373
return [
@@ -97,7 +97,7 @@ public function testIsDisplayed($expected, $allowed, $cacheTypes)
9797

9898
public function isDisplayedDataProvider()
9999
{
100-
$cacheTypesMock = $this->getMock(\stdClass::class, ['getCacheType']);
100+
$cacheTypesMock = $this->createPartialMock(\stdClass::class, ['getCacheType']);
101101
$cacheTypesMock->expects($this->any())->method('getCacheType')->will($this->returnValue('someVal'));
102102
$cacheTypes = [$cacheTypesMock, $cacheTypesMock];
103103
return [

app/code/Magento/AdminNotification/Test/Unit/Model/System/Message/Media/Synchronization/ErrorTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
namespace Magento\AdminNotification\Test\Unit\Model\System\Message\Media\Synchronization;
77

8-
class ErrorTest extends \PHPUnit_Framework_TestCase
8+
class ErrorTest extends \PHPUnit\Framework\TestCase
99
{
1010
/**
1111
* @var \PHPUnit_Framework_MockObject_MockObject
@@ -24,9 +24,12 @@ class ErrorTest extends \PHPUnit_Framework_TestCase
2424

2525
protected function setUp()
2626
{
27-
$this->_syncFlagMock = $this->getMock(\Magento\MediaStorage\Model\File\Storage\Flag::class, [], [], '', false);
27+
$this->_syncFlagMock = $this->createPartialMock(
28+
\Magento\MediaStorage\Model\File\Storage\Flag::class,
29+
['setState', 'save', 'getFlagData']
30+
);
2831

29-
$this->_fileStorage = $this->getMock(\Magento\MediaStorage\Model\File\Storage\Flag::class, [], [], '', false);
32+
$this->_fileStorage = $this->createMock(\Magento\MediaStorage\Model\File\Storage\Flag::class);
3033
$this->_fileStorage->expects($this->any())->method('loadSelf')->will($this->returnValue($this->_syncFlagMock));
3134

3235
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
namespace Magento\AdminNotification\Test\Unit\Model\System\Message;
77

8-
class SecurityTest extends \PHPUnit_Framework_TestCase
8+
class SecurityTest extends \PHPUnit\Framework\TestCase
99
{
1010
/**
1111
* @var \PHPUnit_Framework_MockObject_MockObject
@@ -35,14 +35,11 @@ class SecurityTest extends \PHPUnit_Framework_TestCase
3535
protected function setUp()
3636
{
3737
//Prepare objects for constructor
38-
$this->_cacheMock = $this->getMock(\Magento\Framework\App\CacheInterface::class);
39-
$this->_scopeConfigMock = $this->getMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
40-
$this->_curlFactoryMock = $this->getMock(
38+
$this->_cacheMock = $this->createMock(\Magento\Framework\App\CacheInterface::class);
39+
$this->_scopeConfigMock = $this->createMock(\Magento\Framework\App\Config\ScopeConfigInterface::class);
40+
$this->_curlFactoryMock = $this->createPartialMock(
4141
\Magento\Framework\HTTP\Adapter\CurlFactory::class,
42-
['create'],
43-
[],
44-
'',
45-
false
42+
['create']
4643
);
4744

4845
$objectManagerHelper = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
@@ -70,7 +67,7 @@ public function testIsDisplayed($expectedResult, $cached, $response)
7067
$this->_cacheMock->expects($this->any())->method('load')->will($this->returnValue($cached));
7168
$this->_cacheMock->expects($this->any())->method('save')->will($this->returnValue(null));
7269

73-
$httpAdapterMock = $this->getMock(\Magento\Framework\HTTP\Adapter\Curl::class, [], [], '', false);
70+
$httpAdapterMock = $this->createMock(\Magento\Framework\HTTP\Adapter\Curl::class);
7471
$httpAdapterMock->expects($this->any())->method('read')->will($this->returnValue($response));
7572
$this->_curlFactoryMock->expects($this->any())->method('create')->will($this->returnValue($httpAdapterMock));
7673

app/code/Magento/AdminNotification/Ui/Component/DataProvider/DataProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
/**
1212
* @api
13+
* @since 100.2.0
1314
*/
1415
class DataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider
1516
{
@@ -21,6 +22,7 @@ class DataProvider extends \Magento\Ui\DataProvider\AbstractDataProvider
2122
* @param SynchronizedFactory $messageCollectionFactory
2223
* @param array $meta
2324
* @param array $data
25+
* @since 100.2.0
2426
*/
2527
public function __construct(
2628
$name,

0 commit comments

Comments
 (0)