public function testInitFormWithoutSection() { $this->_formFactoryMock->expects($this->any())->method('create')->will($this->returnValue($this->_formMock)); $this->_formMock->expects($this->once())->method('setParent')->with($this->_object); $this->_formMock->expects($this->once())->method('setBaseUrl')->with('base_url'); $this->_urlModelMock->expects($this->any())->method('getBaseUrl')->will($this->returnValue('base_url')); $this->_systemConfigMock->expects($this->once())->method('getElement')->with('section_code')->will($this->returnValue(null)); $this->_object->initForm(); $this->assertEquals($this->_formMock, $this->_object->getForm()); }