This repository was archived by the owner on Apr 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Test case front controller
Vadim Justus edited this page Jun 25, 2014
·
3 revisions
That test case is designt for testing controller classes.
The test case initiates mock objects during the setup process.
Use the method getRegisteredMock() to get access to the mock instances.
The following list shows you which key you can use and what mock you will get.
| Key | Class |
|---|---|
| response | Mage_Core_Controller_Response_Http |
| front_controller | Mage_Core_Controller_Varien_Front |
| layout | Mage_Core_Model_Layout |
| layout_update | Mage_Core_Model_Layout_Update |
| design_package | Mage_Core_Model_Design_Package |
| translate_inline | Mage_Core_Model_Translate_Inline |
$mock = $this->getRegisteredMock('some-key');There are additional public methods provided by that test case.
/**
* Add mocked block instance to layout
*
* @param string $nameInLayout
* @param string $blockClassName
*/
public function addMockedBlockToLayout($nameInLayout, $blockClassName) {}