Example #1
0
 /**
  * @test
  */
 public function it_should_be_able_to_add_media()
 {
     $options = ['source' => '/file/video.mp4', 'format' => ['output' => 'thumbnail', 'time' => '20%']];
     $this->mockRoute('encodingcom/notify', 'http://localhost/encodingcom/notify/hash');
     $this->mockUrl('/file/video.mp4', 'http://localhost/file/video.mp4');
     $this->mockCommand('AddMedia', ['source' => 'http://localhost/file/video.mp4', 'format' => ['output' => 'thumbnail', 'time' => '20%'], 'notify_format' => 'xml', 'notify' => 'http://localhost/encodingcom/notify/hash']);
     $result = $this->client->addMedia($options);
     $this->assertEquals(['result' => true], $result);
 }