public function testFailedResumableTransferWillNotThrowAndReturnSameChunk()
 {
     $this->graphApi->failOnTransfer();
     $uploader = new FacebookResumableUploader($this->fbApp, $this->client, 'access_token', 'v2.4');
     $chunk = new FacebookTransferChunk($this->file, '1', '2', '3', '4');
     $newChunk = $uploader->transfer('/me/videos', $chunk);
     $this->assertSame($newChunk, $chunk);
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \Facebook\Exceptions\FacebookResponseException
  */
 public function testMaxingOutRetriesWillThrow()
 {
     $client = new FakeGraphApiForResumableUpload();
     $client->failOnTransfer();
     $config = array_merge($this->config, ['http_client_handler' => $client]);
     $fb = new Facebook($config);
     $response = $fb->uploadVideo('4', __DIR__ . '/foo.txt', [], 'foo-token', 3);
 }