Skip to content

Commit

Permalink
Fix wrong interface implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalevanec committed Apr 3, 2019
1 parent 9e6f56b commit 8a98f20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
*/
namespace Magento\Backend\Controller\Adminhtml\Dashboard;

use Magento\Framework\App\Action\HttpPostActionInterface;

/**
* Get most viewed products controller.
*/
class ProductsViewed extends AjaxBlock
class ProductsViewed extends AjaxBlock implements HttpPostActionInterface
{
/**
* Gets most viewed products list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Backend\Controller\Adminhtml\Dashboard;

/**
* Test product viewed backend controller.
*/
class ProductsViewedTest extends \Magento\TestFramework\TestCase\AbstractBackendController
{
/**
Expand All @@ -14,6 +18,7 @@ class ProductsViewedTest extends \Magento\TestFramework\TestCase\AbstractBackend
*/
public function testExecute()
{
$this->getRequest()->setMethod("POST");
$this->dispatch('backend/admin/dashboard/productsViewed/');

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

0 comments on commit 8a98f20

Please sign in to comment.