Elgg\RouterTest::testCanRespondToAjaxViewRequestForCSS PHP Метод

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

    public function testCanRespondToAjaxViewRequestForCSS()
    {
        $this->request = $this->prepareHttpRequest('ajax/view/css/styles.css', 'GET', [], 1);
        $this->createService();
        $this->route();
        $response = _elgg_services()->responseFactory->getSentResponse();
        $this->assertInstanceOf(Response::class, $response);
        $this->assertEquals(ELGG_HTTP_OK, $response->getStatusCode());
        $this->assertEquals(file_get_contents($this->viewsDir . '/default/styles.css'), $response->getContent());
        $this->assertContains('text/css', $response->headers->get('Content-Type'));
        $this->assertContains('charset=utf-8', strtolower($response->headers->get('Content-Type')));
    }
RouterTest