| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function testItAddsATokenToTheRequest() |
||
| 32 | { |
||
| 33 | $auth = new JsonFileServiceAuth($this->getClientMock()); |
||
| 34 | |||
| 35 | // This file is a fake, of course. |
||
| 36 | $file = __DIR__ . '/../../../../test_data/given_by_google.json'; |
||
| 37 | |||
| 38 | $auth->setOptions(['json_file' => $file]); |
||
| 39 | $request = new Request('POST', 'http://fake.com'); |
||
| 40 | $auth->auth($request); |
||
| 41 | |||
| 42 | $this->assertContains('ya29.1.AADHN_WnGjqYiAcnONRLFDOfXia5XZLFO4RSyEhWtQPAvYpgPYiQj89c7UsrAs5_',(string)$request->getHeader('Authorization')); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |