/**
  * @covers Aws\ElasticTranscoder\ElasticTranscoderClient::factory
  */
 public function testFactoryInitializesClient()
 {
     $client = ElasticTranscoderClient::factory(array('key' => 'foo', 'secret' => 'bar', 'region' => 'us-east-1'));
     $this->assertInstanceOf('Aws\\Common\\Signature\\SignatureV4', $this->readAttribute($client, 'signature'));
     $this->assertInstanceOf('Aws\\Common\\Credentials\\Credentials', $client->getCredentials());
     $this->assertEquals('https://elastictranscoder.us-east-1.amazonaws.com', $client->getBaseUrl());
 }
 public function create_transcoder_job($domain, Request $request)
 {
     $file = $request->file;
     $tmp_path = '/tmp';
     $preset_id = '1478526165297-y05g0m';
     $input_key_prefix = 'cmstorage/tmp/';
     $output_key_prefix = 'videos/';
     $pipeline_id = "1478280152129-eo6jb5";
     $transcoder_client = ElasticTranscoderClient::factory(array("credentials" => ['key' => config('app.s3_key'), 'secret' => config('app.s3_secret')], 'region' => config('app.s3_region'), 'version' => 'latest', 'default_caching_config' => '/tmp'));
     $job = create_elastic_transcoder_job($transcoder_client, $pipeline_id, $file, $preset_id, $output_key_prefix);
     return $this->respond(['id' => $job['Id']]);
 }
 /**
  * @expectedException \Aws\ElasticTranscoder\Exception\ResourceNotFoundException
  */
 public function testErrorParsing()
 {
     $this->transcoder->cancelJob(array('Id' => '1111111111111-abcdef'));
 }