Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function shouldAddTokenToRequest() |
||
37 | { |
||
38 | $auth = new ServiceAuth($this->getClientMock()); |
||
39 | $auth->setOptions(['cert_file' => __DIR__ . '/../../../../test_data/cert.p12', 'email' => 'myemail_for_google_service@googleapi_etc.com']); |
||
40 | $request = new Request('POST', 'http://fake.com'); |
||
41 | $auth->auth($request); |
||
42 | |||
43 | $this->assertContains('ya29.1.AADHN_WnGjqYiAcnONRLFDOfXia5XZLFO4RSyEhWtQPAvYpgPYiQj89c7UsrAs5_',(string)$request->getHeader('Authorization')); |
||
44 | } |
||
45 | } |
||
46 |