Question

How to completely reset a request params between dispatches ?

In Ecomdev_Phpunit I did an upload test, set request like this:

$this->getRequest()->setParam('upload', "");

and params becomes:

    $this->getRequest()->getParams();
    array (
      'upload' => '',
    )

Then I want to make another test, but i need that upload empty param to be deleted.

How to I get rid of these parameter in scope of single test ?

Was it helpful?

Solution

It could be done with

$this->getRequest()->resetParams();

In case of the base EcomDev_PHPUnit_Test_Case, this is not possible. Alternatively, the default request is available via Mage::app()->getRequest() then.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top