Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function testGetAuthorizeUrl() |
||
32 | { |
||
33 | $redirectUrl = $this->session->getAuthorizeUrl(); |
||
34 | |||
35 | $this->assertNotEmpty($redirectUrl, 'authorize url from spotify is empty'); |
||
36 | $parseRedirectUrl = parse_url($redirectUrl); |
||
37 | $this->assertSame('accounts.spotify.com', $parseRedirectUrl['host']); |
||
38 | $this->assertSame('/authorize', $parseRedirectUrl['path']); |
||
39 | |||
40 | $this->assertNotEmpty($parseRedirectUrl['query']); |
||
41 | |||
42 | $info = []; |
||
43 | parse_str($parseRedirectUrl['query'], $info); |
||
44 | |||
45 | $this->assertSame('code', $info['response_type']); |
||
46 | $this->assertSame('http://localhost/', $info['redirect_uri']); |
||
47 | $this->assertTrue(isset($info['client_id'])); |
||
48 | } |
||
57 |