/** * @author Sebastian Kurfürst <*****@*****.**> */ public function setUp() { $this->viewHelper = $this->getAccessibleMock('Tx_Fluid_Core_Widget_AbstractWidgetViewHelper', array('validateArguments', 'initialize', 'callRenderMethod', 'getWidgetConfiguration', 'getRenderingContext')); $this->ajaxWidgetContextHolder = $this->getMock('Tx_Fluid_Core_Widget_AjaxWidgetContextHolder'); $this->viewHelper->injectAjaxWidgetContextHolder($this->ajaxWidgetContextHolder); $this->widgetContext = $this->getMock('Tx_Fluid_Core_Widget_WidgetContext'); $this->objectManager = $this->getMock('Tx_Extbase_Object_ObjectManagerInterface'); $this->objectManager->expects($this->at(0))->method('create')->with('Tx_Fluid_Core_Widget_WidgetContext')->will($this->returnValue($this->widgetContext)); $this->viewHelper->injectObjectManager($this->objectManager); $this->request = $this->getMock('Tx_Extbase_MVC_Web_Request'); $this->controllerContext = $this->getMock('Tx_Extbase_MVC_Controller_ControllerContext', array(), array(), '', FALSE); $this->controllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($this->request)); $this->viewHelper->_set('controllerContext', $this->controllerContext); }