Ejemplo n.º 1
0
 public function createGuzzleClient(array $config)
 {
     $config = new Collection($config);
     $httpClient = new \GuzzleHttp\Client();
     $description = new Description($this->getDescription());
     $serializer = new Serializer($description, ['json_body' => new JsonBodyLocation('body')]);
     $client = new GuzzleClient($httpClient, $description, ['serializer' => $serializer]);
     $client->getEmitter()->attach(new Authorization($config->get('token'), $config->get('secret')));
     return $client;
 }
Ejemplo n.º 2
0
 /**
  * @dataProvider falseyDataProvider
  */
 public function testReturnsCorrectData($a, $b)
 {
     $c = new Collection(array('value' => $a));
     $this->assertSame($b, $c->get('value'));
 }
Ejemplo n.º 3
0
 /**
  * @return string
  */
 public function getOauthToken()
 {
     return $this->config->get('oauth_token');
 }