public function testResumesUpload()
{
$response = new Response(200, [], $this->successBody);
$statusResponse = new Response(200, ['Range' => 'bytes 0-2']);
$this->requestWrapper->send(Argument::type('Psr\\Http\\Message\\RequestInterface'), Argument::type('array'))->willReturn($response);
$this->requestWrapper->send(Argument::that(function ($request) {
return $request->getHeaderLine('Content-Range') === 'bytes */*';
}), Argument::type('array'))->willReturn($statusResponse);
$uploader = new ResumableUploader($this->requestWrapper->reveal(), $this->stream, 'http://www.example.com');
$this->assertEquals(json_decode($this->successBody, true), $uploader->resume('http://some-resume-uri.example.com'));
}