File tree 2 files changed +7
-2
lines changed
app/code/Magento/Backend/Controller/Adminhtml/Dashboard
dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
namespace Magento \Backend \Controller \Adminhtml \Dashboard ;
8
8
9
- use Magento \Framework \App \Action \HttpGetActionInterface ;
9
+ use Magento \Framework \App \Action \HttpPostActionInterface ;
10
10
11
11
/**
12
12
* Get most viewed products controller.
13
13
*/
14
- class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
14
+ class ProductsViewed extends AjaxBlock implements HttpPostActionInterface
15
15
{
16
16
/**
17
17
* Gets most viewed products list
Original file line number Diff line number Diff line change 4
4
* Copyright © Magento, Inc. All rights reserved.
5
5
* See COPYING.txt for license details.
6
6
*/
7
+
7
8
namespace Magento \Backend \Controller \Adminhtml \Dashboard ;
8
9
10
+ /**
11
+ * Test product viewed backend controller.
12
+ */
9
13
class ProductsViewedTest extends \Magento \TestFramework \TestCase \AbstractBackendController
10
14
{
11
15
/**
@@ -14,6 +18,7 @@ class ProductsViewedTest extends \Magento\TestFramework\TestCase\AbstractBackend
14
18
*/
15
19
public function testExecute ()
16
20
{
21
+ $ this ->getRequest ()->setMethod ("POST " );
17
22
$ this ->dispatch ('backend/admin/dashboard/productsViewed/ ' );
18
23
19
24
$ this ->assertEquals (200 , $ this ->getResponse ()->getHttpResponseCode ());
You can’t perform that action at this time.
0 commit comments