public function testEmitBody() { $response = new Response(); $content = 'Lorem ipsum dolor sit amet'; $response->getBody()->write($content); Response\send_headers(false); $emitter = new SapiEmitter(); ob_start(); $emitter->emit($response); $buffer = ob_get_clean(); $this->assertSame($content, $buffer); $this->assertSame(0, Response\ob_get_level()); }
public function testReasonPhraseReturnsEmptyStringIfPhraseNotExists() { $response = new Response(); $new = $response->withStatus(250); $this->assertEquals('', $new->getReasonPhrase()); }