File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Class TikTokAPITest
4+ *
5+ * @created 06.04.2018
6+ * @author Smiley <[email protected] > 7+ * @copyright 2018 Smiley
8+ * @license MIT
9+ */
10+ declare (strict_types=1 );
11+
12+ use chillerlan \OAuth \Providers \TikTok ;
13+ use chillerlan \OAuthTest \Attributes \Provider ;
14+ use chillerlan \OAuthTest \Providers \Live \OAuth2ProviderLiveTestAbstract ;
15+ use PHPUnit \Framework \Attributes \Group ;
16+
17+ /**
18+ * @property \chillerlan\OAuth\Providers\TikTok $provider
19+ */
20+ #[Group('providerLiveTest ' )]
21+ #[Provider(TikTok::class)]
22+ final class TikTokAPITest extends OAuth2ProviderLiveTestAbstract{
23+
24+ }
Original file line number Diff line number Diff line change 1313
1414use chillerlan \HTTP \Utils \QueryUtil ;
1515use chillerlan \OAuth \Providers \TikTok ;
16+ use chillerlan \OAuthTest \Attributes \Provider ;
1617use function implode ;
1718
1819/**
1920 * @property \chillerlan\OAuth\Providers\TikTok $provider
2021 */
22+ #[Provider(TikTok::class)]
2123final class TikTokTest extends OAuth2ProviderUnitTestAbstract{
2224
23- protected function getProviderFQCN ():string {
24- return TikTok::class;
25- }
26-
2725 public function testGetAuthURL ():void {
2826 $ uri = $ this ->provider ->getAuthorizationURL ();
2927 $ params = QueryUtil::parse ($ uri ->getQuery ());
@@ -53,7 +51,7 @@ public function testGetAuthURLRequestParams():void{
5351 public function testGetAccessTokenRequestBodyParams ():void {
5452 $ verifier = $ this ->provider ->generateVerifier ($ this ->options ->pkceVerifierLength );
5553
56- $ this ->storage ->storeCodeVerifier ($ verifier , $ this ->provider ->name );
54+ $ this ->storage ->storeCodeVerifier ($ verifier , $ this ->provider ->getName () );
5755
5856 $ params = $ this ->invokeReflectionMethod ('getAccessTokenRequestBodyParams ' , ['*test_code* ' ]);
5957
@@ -76,5 +74,4 @@ public function testGetRefreshAccessTokenRequestBodyParams():void{
7674 $ this ::assertSame ('refresh_token ' , $ params ['grant_type ' ]);
7775 }
7876
79-
8077}
You can’t perform that action at this time.
0 commit comments