| @@ 51-57 (lines=7) @@ | ||
| 48 | /** |
|
| 49 | * |
|
| 50 | */ |
|
| 51 | public function testAssertValidateAccessToken() |
|
| 52 | { |
|
| 53 | $this->specify('verify service validateAccessToken', function () { |
|
| 54 | $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer()); |
|
| 55 | verify($service->validateAccessToken(true, self::$token['access_token']))->true(); |
|
| 56 | }); |
|
| 57 | } |
|
| 58 | ||
| 59 | /** |
|
| 60 | * |
|
| @@ 62-69 (lines=8) @@ | ||
| 59 | /** |
|
| 60 | * |
|
| 61 | */ |
|
| 62 | public function testAssertGetResourceOwnerId() |
|
| 63 | { |
|
| 64 | $this->specify('verify service can getResourceOwnerId', function () { |
|
| 65 | $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer()); |
|
| 66 | $service->validateAccessToken(true, self::$token['access_token']); |
|
| 67 | verify($service->getResourceOwnerId())->equals('test'); |
|
| 68 | }); |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * |
|
| @@ 74-81 (lines=8) @@ | ||
| 71 | /** |
|
| 72 | * |
|
| 73 | */ |
|
| 74 | public function testAssertGetResourceOwnerType() |
|
| 75 | { |
|
| 76 | $this->specify('verify service can getResourceOwnerType', function () { |
|
| 77 | $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer()); |
|
| 78 | $service->validateAccessToken(true, self::$token['access_token']); |
|
| 79 | verify($service->getResourceOwnerType())->equals('test'); |
|
| 80 | }); |
|
| 81 | } |
|
| 82 | ||
| 83 | /** |
|
| 84 | * |
|
| @@ 86-93 (lines=8) @@ | ||
| 83 | /** |
|
| 84 | * |
|
| 85 | */ |
|
| 86 | public function testAssertGetClientId() |
|
| 87 | { |
|
| 88 | $this->specify('verify service can getClientId', function () { |
|
| 89 | $service = new OAuth2Service($this->createAuthorizationServer(), $this->createResourceServer()); |
|
| 90 | $service->validateAccessToken(true, self::$token['access_token']); |
|
| 91 | verify($service->getClientId())->equals('test'); |
|
| 92 | }); |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|
| 96 | * @return League\OAuth2\Server\AuthorizationServer |
|