PhlyTest\Http\Response\SapiEmitterTest::testEmitsResponseHeaders PHP Метод

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

    public function testEmitsResponseHeaders()
    {
        $response = (new Response())->withStatus(200)->withAddedHeader('Content-Type', 'text/plain');
        $response->getBody()->write('Content!');
        ob_start();
        $this->emitter->emit($response);
        ob_end_clean();
        $this->assertContains('HTTP/1.1 200 OK', HeaderStack::stack());
        $this->assertContains('Content-Type: text/plain', HeaderStack::stack());
    }