示例#1
0
 /**
  * @param array $options
  * @param array $notifyParams
  *
  * @return EncodingResponse
  */
 public function addMedia($options, $notifyParams = [])
 {
     $baseSettings = ['format' => $this->config->getNotify()->getFormat(), 'notify_format' => $this->config->getNotify()->getFormat(), 'notify' => $this->routeAssembler->buildRoute($this->config->getNotify()->getNotifyRoute(), $notifyParams)];
     $options = array_merge($baseSettings, $options);
     $options['source'] = $this->routeAssembler->buildUrl($options['source']);
     $command = $this->client->getCommand('AddMedia', $options);
     return $this->runCommand($command);
 }
 /**
  * @test
  */
 public function it_should_be_able_to_build_urls()
 {
     $expected = 'http://localhost/path/to/url';
     $this->assertEquals($this->routeAssembler->buildUrl('/path/to/url'), $expected);
 }
示例#3
0
 /**
  * @param $url
  * @param $fullUrl
  */
 protected function mockUrl($url, $fullUrl)
 {
     $this->routeAssembler->expects($this->any())->method('buildUrl')->with($url)->will($this->returnValue($fullUrl));
 }