Neos\Flow\Tests\Unit\Mvc\Controller\ActionControllerTest::processRequestThrowsExceptionIfRequestedActionIsNotCallable PHP Method

processRequestThrowsExceptionIfRequestedActionIsNotCallable() public method

    public function processRequestThrowsExceptionIfRequestedActionIsNotCallable()
    {
        $this->actionController = new ActionController();
        $this->inject($this->actionController, 'objectManager', $this->mockObjectManager);
        $this->inject($this->actionController, 'controllerContext', $this->mockControllerContext);
        $mockRequest = $this->getMockBuilder(Mvc\ActionRequest::class)->disableOriginalConstructor()->getMock();
        $mockRequest->expects($this->any())->method('getControllerActionName')->will($this->returnValue('nonExisting'));
        $this->inject($this->actionController, 'arguments', new Arguments([]));
        $mockHttpRequest = $this->getMockBuilder(Http\Request::class)->disableOriginalConstructor()->getMock();
        $mockHttpRequest->expects($this->any())->method('getNegotiatedMediaType')->will($this->returnValue('*/*'));
        $mockRequest->expects($this->any())->method('getHttpRequest')->will($this->returnValue($mockHttpRequest));
        $mockResponse = $this->createMock(Http\Response::class);
        $this->actionController->processRequest($mockRequest, $mockResponse);
    }