File tree 2 files changed +8
-1
lines changed
app/code/Magento/Backend/Controller/Adminhtml/Dashboard
dev/tests/integration/testsuite/Magento/Backend/Controller/Adminhtml/Dashboard 2 files changed +8
-1
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 \HttpPostActionInterface ;
10
+
9
11
/**
10
12
* Get most viewed products controller.
11
13
*/
12
- class ProductsViewed extends AjaxBlock
14
+ class ProductsViewed extends AjaxBlock implements HttpPostActionInterface
13
15
{
14
16
/**
15
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