Example #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_routes()
 {
     $expected = 'http://localhost/path/to/route';
     $this->router->expects($this->any())->method('assemble')->with(['hash' => 'hash'], ['name' => 'route', 'force_canonical' => true, 'uri' => $this->uri])->will($this->returnValue($expected));
     $this->assertEquals($this->routeAssembler->buildRoute('route'), $expected);
 }