Elgg\RouterTest::testRespondsWithErrorToNonAjaxRequestForAjaxView PHP Method

testRespondsWithErrorToNonAjaxRequestForAjaxView() public method

    public function testRespondsWithErrorToNonAjaxRequestForAjaxView()
    {
        /**
         * @todo: revisit once gatekeepers have been refactored in a service
         */
        $this->markTestSkipped();
        $this->request = $this->prepareHttpRequest('ajax/view/unallowed', 'GET');
        $this->createService();
        $this->assertTrue($this->route());
        $response = _elgg_services()->responseFactory->getSentResponse();
        $this->assertInstanceOf(RedirectResponse::class, $response);
        $this->assertEquals($this->request->headers->get('Referer'), $response->getTargetUrl());
    }
RouterTest