/** * @dataProvider provideRequestAdditionnalData */ public function testGetRequestOk($parameters, $headers) { $url = "http://httpbin.org/get"; $apiConfiguration = Mockery::mock('GameScan\\Core\\Request\\Api\\ApiConfigurationInterface', array("getParameters" => $parameters, "getHeaders" => $headers)); $gameApi = new Api\GameApiRequest($apiConfiguration); $content = $gameApi->get($url); $content = json_decode($content); $this->assertParametersFromGetRequest($parameters, $content); $this->assertHeadersFromGetRequest($headers, $content); }
public function get($ressourceToGrab, array $parameters = null) { $this->checkHost(); $ressourceToGrab = $this->buildUrl($ressourceToGrab); $parameters = $this->addLocaleToParameters($parameters); return parent::get($ressourceToGrab, $parameters); }