| @@ 59-65 (lines=7) @@ | ||
| 56 | /** |
|
| 57 | * @test |
|
| 58 | */ |
|
| 59 | public function canGetSecuredContentWitValidPskToken() |
|
| 60 | { |
|
| 61 | $client = $this->createClient(); |
|
| 62 | $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::PSK_TOKEN]; |
|
| 63 | $client->request('GET', '/secured', $parameters = [], $files = [], $server); |
|
| 64 | $this->assertSame('SECURED CONTENT', $client->getResponse()->getContent()); |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @test |
|
| @@ 70-76 (lines=7) @@ | ||
| 67 | /** |
|
| 68 | * @test |
|
| 69 | */ |
|
| 70 | public function canGetSecuredContentWitValidHmacToken() |
|
| 71 | { |
|
| 72 | $client = $this->createClient(); |
|
| 73 | $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::HMAC_TOKEN]; |
|
| 74 | $client->request('GET', '/secured', $parameters = [], $files = [], $server); |
|
| 75 | $this->assertSame('SECURED CONTENT', $client->getResponse()->getContent()); |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * @test |
|
| @@ 81-87 (lines=7) @@ | ||
| 78 | /** |
|
| 79 | * @test |
|
| 80 | */ |
|
| 81 | public function canGetSecuredContentWithSecretLoader() |
|
| 82 | { |
|
| 83 | $client = $this->createClient(); |
|
| 84 | $server = ['HTTP_AUTHORIZATION' => 'Bearer ' . self::DYN_HMAC_TOKEN]; |
|
| 85 | $client->request('GET', '/secured-with-secret-loader', $parameters = [], $files = [], $server); |
|
| 86 | $this->assertSame('CONTENT SECURED WITH SECRET LOADER', $client->getResponse()->getContent()); |
|
| 87 | } |
|
| 88 | } |
|
| 89 | ||