Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 3 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
13 | 1 | public function testCreateAuthorizationUrl() |
|
14 | { |
||
15 | 1 | $expected = 'https://ads.tiktok.com/marketing_api/auth?app_id=appId&state=state&redirect_uri=redirectUri&scope=%5B1%2C2%5D'; |
|
16 | 1 | ||
17 | 1 | $actual = OAuth2Client::createAuthorizationUrl( |
|
18 | 'appId', |
||
19 | 1 | 'redirectUri', |
|
20 | 'state', |
||
21 | 1 | [1, 2], |
|
22 | 1 | 'https://ads.tiktok.com' |
|
23 | ); |
||
24 | 1 | ||
25 | $partsToTest = [PHP_URL_HOST, PHP_URL_PATH, PHP_URL_QUERY, PHP_URL_SCHEME]; |
||
26 | |||
27 | foreach ($partsToTest as $part) { |
||
28 | $this->assertEquals(parse_url($expected, $part), parse_url($actual, $part)); |
||
29 | } |
||
32 |