public function testGetSaveUrl() { $expectedUrl = '*/system_config_save/index'; $expectedParams = array('_current' => true); $this->_urlModelMock->expects($this->once())->method('getUrl')->with($expectedUrl, $expectedParams)->will($this->returnArgument(0)); $this->assertEquals($expectedUrl, $this->_object->getSaveUrl()); }
public function testInitFormWhenFrontendModelIsSet() { $block = $this->getMock('Mage_Core_Block_Template', array('initForm', 'getNameInLayout', 'getIsAnonymous'), array(), '', false, false); $block->expects($this->once())->method('initForm'); $block->expects($this->once())->method('getNameInLayout')->will($this->returnValue('test_block_name')); $this->_layoutMock->expects($this->once())->method('createBlock')->with('Some_Frontend_Model')->will($this->returnValue($block)); $this->_layoutMock->expects($this->once())->method('setChild')->with(null, 'test_block_name', 'form'); $this->_object->initForm(); }