Exemplo n.º 1
0
 public function testUsesStreamProvidedInConstructorAsBody()
 {
     $stream = $this->getMock('Psr\\Http\\Message\\StreamInterface');
     $message = new Request(null, null, $stream);
     $this->assertSame($stream, $message->getBody());
 }
Exemplo n.º 2
0
 public function testDefaultStreamIsWritable()
 {
     $request = new Request();
     $request->getBody()->write("test");
     $this->assertSame("test", (string) $request->getBody());
 }