/**
  * @covers ::__construct
  * @covers ::getSecret
  * @covers ::getHttp
  */
 public function testConstruction()
 {
     $http = new GuzzleAdapter(new GuzzleClient(array('handler' => new MockHandler())));
     $client = new Client('aaaaa', 'bbbbb', $http);
     $this->assertEquals('bbbbb', $client->getSecret());
     $this->assertSame($http, $client->getHttp());
     $client = new Client('ccccc', 'ddddd');
     $this->assertEquals('ddddd', $client->getSecret());
     $this->assertNotNull($client->getHttp());
 }
 /**
  * Get the contents of the Authorization header based on the given request
  * body. Returns the base-64 encoded HMAC SHA-256 digest.
  *
  * @return string
  */
 protected function getAuthorization($body)
 {
     return base64_encode(hash_hmac('sha256', $body, $this->client->getSecret(), true));
 }