public function testRewindsBodyIfPossible() { $body = Psr7\stream_for(str_repeat('x', 1024 * 1024 * 2)); $body->seek(1024 * 1024); $this->assertSame(1024 * 1024, $body->tell()); $req = new Psr7\Request('POST', 'https://www.example.com', ['Content-Length' => 1024 * 1024 * 2], $body); $factory = new CurlFactory(1); $factory->create($req, []); $this->assertSame(0, $body->tell()); }