public function testChangingUnderlyingStreamUpdatesSizeAndStream() { $size = filesize(__FILE__); $s = fopen(__FILE__, 'r'); $this->body->setStream($s, $size); $this->assertEquals($size, $this->body->getSize()); $this->assertEquals($size, $this->decorated->getSize()); $this->assertSame($s, $this->body->getStream()); $this->assertSame($s, $this->decorated->getStream()); }