public function testConstructorCanAcceptAllMessageParts() { $body = new MemoryStream(); $status = 302; $headers = ['location' => ['http://example.com/']]; $response = new Response($body, $status, $headers); $this->assertSame($body, $response->getBody()); $this->assertEquals(302, $response->getStatusCode()); $this->assertEquals($headers, $response->getHeaders()); }
public function testUsesStreamProvidedInConstructorAsBody() { $this->assertSame($this->stream, $this->message->getBody()); }