@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | public function testGetAuthorizeUrlForPlaylistModifyPublic(): void |
15 | 15 | { |
16 | - var_dump($_ENV['test'], getenv('test')); |
|
16 | + var_dump($_ENV[ 'test' ], getenv('test')); |
|
17 | 17 | $sessionMock = $this->getSessionMock(); |
18 | 18 | |
19 | 19 | $sessionMock->method('getAuthorizeUrl') |
@@ -28,22 +28,22 @@ |
||
28 | 28 | |
29 | 29 | $this->assertNotEmpty($redirectUrl, 'authorize url from spotify is empty'); |
30 | 30 | $parseRedirectUrl = parse_url($redirectUrl); |
31 | - $this->assertSame('accounts.spotify.com', $parseRedirectUrl['host']); |
|
32 | - $this->assertSame('/authorize', $parseRedirectUrl['path']); |
|
31 | + $this->assertSame('accounts.spotify.com', $parseRedirectUrl[ 'host' ]); |
|
32 | + $this->assertSame('/authorize', $parseRedirectUrl[ 'path' ]); |
|
33 | 33 | |
34 | - $this->assertNotEmpty($parseRedirectUrl['query']); |
|
34 | + $this->assertNotEmpty($parseRedirectUrl[ 'query' ]); |
|
35 | 35 | |
36 | - $info = []; |
|
37 | - parse_str($parseRedirectUrl['query'], $info); |
|
36 | + $info = [ ]; |
|
37 | + parse_str($parseRedirectUrl[ 'query' ], $info); |
|
38 | 38 | |
39 | - $this->assertSame('code', $info['response_type']); |
|
40 | - $this->assertSame($_ENV['REDIRECT_URI'], $info['redirect_uri']); |
|
41 | - $this->assertTrue(isset($info['client_id'])); |
|
39 | + $this->assertSame('code', $info[ 'response_type' ]); |
|
40 | + $this->assertSame($_ENV[ 'REDIRECT_URI' ], $info[ 'redirect_uri' ]); |
|
41 | + $this->assertTrue(isset($info[ 'client_id' ])); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | public function testRefreshAccessToken() |
45 | 45 | { |
46 | - $this->assertTrue($this->session->refreshAccessToken($_ENV['REFRESH_TOKEN'])); |
|
46 | + $this->assertTrue($this->session->refreshAccessToken($_ENV[ 'REFRESH_TOKEN' ])); |
|
47 | 47 | $this->assertNotEmpty($this->session->getAccessToken()); |
48 | 48 | } |
49 | 49 |