Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 2dc699e

Browse files
author
Joan He
committed
MAGETWO-83132: Move the logging to the button click action
- fix build failures
1 parent cf1eb34 commit 2dc699e

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

app/code/Magento/ReleaseNotification/Controller/Adminhtml/Notification/MarkUserNotified.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,9 @@ public function execute()
8484
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
8585
return $resultJson->setData($responseContent);
8686
}
87+
88+
protected function _isAllowed()
89+
{
90+
return parent::_isAllowed();
91+
}
8792
}

app/code/Magento/ReleaseNotification/Test/Unit/Controller/Notification/MarkUserNotifiedTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
/**
2323
* Class MarkUserNotifiedTest
24+
*
25+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2426
*/
2527
class MarkUserNotifiedTest extends \PHPUnit\Framework\TestCase
2628
{
@@ -126,7 +128,7 @@ public function testExecuteSuccess()
126128
->willReturn('999.999.999-alpha');
127129
$this->notificationLoggerMock->expects($this->once())
128130
->method('log')
129-
->with(1 , '999.999.999-alpha')
131+
->with(1, '999.999.999-alpha')
130132
->willReturn(true);
131133
$this->resultMock->expects($this->once())
132134
->method('setData')

app/code/Magento/ReleaseNotification/Test/Unit/Model/Condition/CanViewNotificationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public function testIsVisible($expected, $version, $lastViewVersion)
109109
->willReturn($this->logMock);
110110
$this->cacheStorageMock->expects($this->once())
111111
->method('save')
112-
->with(false,'release-notification-popup-1');
112+
->with(false, 'release-notification-popup-1');
113113
$this->assertEquals($expected, $this->canViewNotification->isVisible([]));
114114
}
115115

dev/tests/integration/testsuite/Magento/ReleaseNotification/Model/ResourceModel/Viewer/LoggerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testLogAndGet()
3535
$userModel = Bootstrap::getObjectManager()->get(\Magento\User\Model\User::class);
3636
$adminUserNameFromFixture = 'adminUser';
3737
$adminUserId = $userModel->loadByUsername($adminUserNameFromFixture)->getId();
38-
$this->assertNull($this->logger->get($adminUserId));
38+
$this->assertEmpty($this->logger->get($adminUserId)->getId());
3939
$firstLogVersion = '2.2.2';
4040
$this->logger->log($adminUserId, $firstLogVersion);
4141
$firstLog = $this->logger->get($adminUserId);

dev/tests/static/testsuite/Magento/Test/Integrity/Magento/Backend/_files/controller_acl_test_whitelist_ce.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ Magento\Swatches\Controller\Adminhtml\Product\Attribute\Plugin\Save
2828
Magento\Ui\Controller\Adminhtml\Export\GridToCsv
2929
Magento\Ui\Controller\Adminhtml\Export\GridToXml
3030
Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper\AttributeFilter
31-
Magento\ReleaseNotification\Controller\Adminhtml\Notification\MarkUserNotified

0 commit comments

Comments
 (0)