/** * Sets up this test case * @return void */ public function setUp() { $this->view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\JsonView', array('loadConfigurationFromYamlFile')); $this->controllerContext = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE); $this->response = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response', array()); $this->controllerContext->expects($this->any())->method('getResponse')->will($this->returnValue($this->response)); $this->view->setControllerContext($this->controllerContext); }
/** * Sets up this test case * @return void */ protected function setUp() { $this->view = $this->getMock(\TYPO3\CMS\Extbase\Mvc\View\JsonView::class, array('loadConfigurationFromYamlFile')); $this->controllerContext = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class, array(), array(), '', false); $this->response = $this->getMock(\TYPO3\CMS\Extbase\Mvc\Web\Response::class, array()); $this->controllerContext->expects($this->any())->method('getResponse')->will($this->returnValue($this->response)); $this->view->setControllerContext($this->controllerContext); }