Skip to content

Commit 247388e

Browse files
authored
ENGCOM-4601: Removed unwanted interface implementation #22002
2 parents 5db19c4 + 5a14b5a commit 247388e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
use Magento\Framework\App\Action\HttpGetActionInterface;
9+
use Magento\Framework\App\Action\HttpPostActionInterface;
1010

1111
/**
1212
* Get most viewed products controller.
1313
*/
14-
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
14+
class ProductsViewed extends AjaxBlock implements HttpPostActionInterface
1515
{
1616
/**
1717
* Gets most viewed products list

dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewedTest.php

+5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
89

10+
/**
11+
* Test product viewed backend controller.
12+
*/
913
class ProductsViewedTest extends \Magento\TestFramework\TestCase\AbstractBackendController
1014
{
1115
/**
@@ -14,6 +18,7 @@ class ProductsViewedTest extends \Magento\TestFramework\TestCase\AbstractBackend
1418
*/
1519
public function testExecute()
1620
{
21+
$this->getRequest()->setMethod("POST");
1722
$this->dispatch('backend/admin/dashboard/productsViewed/');
1823

1924
$this->assertEquals(200, $this->getResponse()->getHttpResponseCode());

0 commit comments

Comments
 (0)