예제 #1
0
 /**
  * @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);
 }
예제 #2
0
 public function get($ressourceToGrab, array $parameters = null)
 {
     $this->checkHost();
     $ressourceToGrab = $this->buildUrl($ressourceToGrab);
     $parameters = $this->addLocaleToParameters($parameters);
     return parent::get($ressourceToGrab, $parameters);
 }