/** * Sets up this test case * @return void */ public function setUp() { $this->view = $this->getMockBuilder(\TYPO3\Flow\Mvc\View\JsonView::class)->setMethods(array('loadConfigurationFromYamlFile'))->getMock(); $this->controllerContext = $this->getMockBuilder(\TYPO3\Flow\Mvc\Controller\ControllerContext::class)->disableOriginalConstructor()->getMock(); $this->response = $this->createMock(\TYPO3\Flow\Http\Response::class); $this->controllerContext->expects($this->any())->method('getResponse')->will($this->returnValue($this->response)); $this->view->setControllerContext($this->controllerContext); }
/** * Sets up this test case * @return void */ public function setUp() { $this->view = $this->getMock('TYPO3\\Flow\\Mvc\\View\\JsonView', array('loadConfigurationFromYamlFile')); $this->controllerContext = $this->getMock('TYPO3\\Flow\\Mvc\\Controller\\ControllerContext', array(), array(), '', FALSE); $this->response = $this->getMock('TYPO3\\Flow\\Http\\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 */ public function setUp() { $this->view = $this->getMock(\TYPO3\Flow\Mvc\View\JsonView::class, array('loadConfigurationFromYamlFile')); $this->controllerContext = $this->getMock(\TYPO3\Flow\Mvc\Controller\ControllerContext::class, array(), array(), '', false); $this->response = $this->getMock(\TYPO3\Flow\Http\Response::class, array()); $this->controllerContext->expects($this->any())->method('getResponse')->will($this->returnValue($this->response)); $this->view->setControllerContext($this->controllerContext); }