/** * Test withBody */ public function testWithBody() { /** @var StreamInterface $stream */ $stream = $this->getMock('Psr\\Http\\Message\\StreamInterface'); $message = $this->messageMock->withBody($stream); $this->assertNotSame($message, $this->messageMock); $this->assertNotEquals($stream, $this->messageMock->getBody()); $this->assertEquals($stream, $message->getBody()); }