Exemplo n.º 1
0
 public function headersProvider()
 {
     $token = new Token();
     $token->setAccessToken('access_token');
     return [['client_id', null, null], ['client_id', 'mashape_key', $token]];
 }
 public function testCheckTokenExpiredFalse()
 {
     $token = new Token();
     $token->setAccessToken('access')->setRefreshToken('refresh')->setExpiresAt(time() + 3600);
     $this->client->expects($this->once())->method('getToken')->willReturn($token);
     /** @noinspection PhpParamsInspection */
     $authHandler = new AuthorizationHandler($this->client, $this->httpClient, $this->tokenMapper);
     $isExpired = $authHandler->checkTokenExpired();
     $this->assertFalse($isExpired);
 }