private function shouldHaveTokenInHeaderForResourceRequests($token)
 {
     /** @var RequestInterface $lastRequest */
     $lastRequest = (new ResourceRequest($this->session))->execute()['request'];
     $this->assertEquals($token, $this->tokenStore->getToken());
     $this->assertTrue($lastRequest->hasHeader('Authorization'));
     $this->assertEquals('Bearer ' . $token, $lastRequest->getHeader('Authorization')[0]);
 }
 /**
  * @dataProvider dataForIsRefreshable
  * @param array $params
  * @param $expectedValue
  */
 public function testIsRefreshable(array $params, $expectedValue)
 {
     $this->tokenSession->replace($params);
     $this->assertSame($expectedValue, $this->tokenStore->isRefreshable());
 }