/** * 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()); }
/** * Add a filter to API calls. * * @param type $filterName * @param type $filterValue */ public function addFilter($filterName, $filterValue) { $this->HTTP->setGlobalParams([$filterName => $filterValue]); }