Skip to content

Commit 6ee8890

Browse files
committed
:octocat: tests
1 parent 5793674 commit 6ee8890

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
}

tests/Providers/Unit/TikTokTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,15 @@
1313

1414
use chillerlan\HTTP\Utils\QueryUtil;
1515
use chillerlan\OAuth\Providers\TikTok;
16+
use chillerlan\OAuthTest\Attributes\Provider;
1617
use function implode;
1718

1819
/**
1920
* @property \chillerlan\OAuth\Providers\TikTok $provider
2021
*/
22+
#[Provider(TikTok::class)]
2123
final 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
}

0 commit comments

Comments
 (0)