Elgg\ActionsServiceTest::testCanRedirectOnNonAjaxRequest PHP Метод

testCanRedirectOnNonAjaxRequest() публичный Метод

    public function testCanRedirectOnNonAjaxRequest()
    {
        $this->assertTrue($this->actions->register('output5', "{$this->actionsDir}/output5.php", 'public'));
        $this->request = $this->prepareHttpRequest('action/output5', 'POST', [], false, true);
        $this->createService();
        set_input('output', 'foo');
        $this->route();
        $response = _elgg_services()->responseFactory->getSentResponse();
        $this->assertInstanceOf(RedirectResponse::class, $response);
        $this->assertEquals(ELGG_HTTP_FOUND, $response->getStatusCode());
    }
ActionsServiceTest