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