/**
  * Test setting of global parameters.
  */
 public function testSetGlobalParams()
 {
     $CurlRequest = new MediaManager\HTTP\CurlRequest('http://www.example.com');
     //Create HTTP Object
     $HTTPObject = new HTTP($CurlRequest);
     //Expected results
     $expected = ['foo' => 'bar'];
     //Set the global params
     $HTTPObject->setGlobalParams($expected);
     //Assert the setting of global params is correct.
     $this->assertEquals($expected, $HTTPObject->getGlobalParams());
 }
Пример #2
0
 /**
  * Get client videos. This will be paged.
  *
  * @return type
  */
 public function getVideos()
 {
     $api = '/videos';
     //Set the request URL to clients API.
     $this->request->setURL($this->BASE_URI . $api);
     //Get API results
     $response = $this->HTTP->Get();
     return new Pager($response);
 }