Skip to content

Commit 618f242

Browse files
author
Oleksii Korshenko
committed
Merge remote-tracking branch 'mainline/develop' into MAGETWO-71359-PR-10432
# Conflicts: # app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php
2 parents ba55dd7 + 45896ba commit 618f242

File tree

9,610 files changed

+52087
-67250
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,610 files changed

+52087
-67250
lines changed

.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/AjaxMarkAsRead.php

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

9+
use Magento\Backend\App\Action;
10+
use Magento\Framework\Controller\ResultFactory;
11+
912
class AjaxMarkAsRead extends \Magento\AdminNotification\Controller\Adminhtml\Notification
1013
{
14+
/**
15+
* @var \Magento\AdminNotification\Model\NotificationService
16+
*/
17+
private $notificationService;
18+
19+
/**
20+
* @param Action\Context $context
21+
* @param \Magento\AdminNotification\Model\NotificationService|null $notificationService
22+
* @throws \RuntimeException
23+
*/
24+
public function __construct(
25+
Action\Context $context,
26+
\Magento\AdminNotification\Model\NotificationService $notificationService = null
27+
) {
28+
parent::__construct($context);
29+
$this->notificationService = $notificationService?: \Magento\Framework\App\ObjectManager::getInstance()
30+
->get(\Magento\AdminNotification\Model\NotificationService::class);
31+
}
32+
1133
/**
1234
* Mark notification as read (AJAX action)
1335
*
14-
* @return void
36+
* @return \Magento\Framework\Controller\Result\Json|void
37+
* @throws \InvalidArgumentException
1538
*/
1639
public function execute()
1740
{
@@ -21,17 +44,15 @@ public function execute()
2144
$notificationId = (int)$this->getRequest()->getPost('id');
2245
$responseData = [];
2346
try {
24-
$this->_objectManager->create(
25-
\Magento\AdminNotification\Model\NotificationService::class
26-
)->markAsRead(
27-
$notificationId
28-
);
47+
$this->notificationService->markAsRead($notificationId);
2948
$responseData['success'] = true;
3049
} catch (\Exception $e) {
3150
$responseData['success'] = false;
3251
}
33-
$this->getResponse()->representJson(
34-
$this->_objectManager->create(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($responseData)
35-
);
52+
53+
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
54+
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
55+
$resultJson->setData($responseData);
56+
return $resultJson;
3657
}
3758
}

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

0 commit comments

Comments
 (0)