Example #1
0
 public function testSendGetRequest()
 {
     $adapterMock = $this->getMock('\\Kokoroe\\Http\\Client\\Adapter\\AdapterInterface');
     $adapterMock->method('send')->with($this->equalTo('GET'), $this->equalTo('https://api.kokoroe.co/v1.0/me?access_token=foo'), $this->equalTo(null), ['Accept-Language' => 'fr-FR']);
     $client = new Client();
     $client->setAdapter($adapterMock);
     $client->get('https://api.kokoroe.co/v1.0/me', ['access_token' => 'foo'], ['Accept-Language' => 'fr-FR']);
 }