Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function shouldAddParameterToUrl() |
||
31 | { |
||
32 | $auth = new PublicApiAccessAuth(); |
||
33 | $auth->setOptions(['key' => 'SOME_YOUTUBE_API_KEY']); |
||
34 | |||
35 | $request = $this->getMockBuilder('Guzzle\Http\Message\Request')->disableOriginalConstructor()->getMock(); |
||
36 | $request |
||
37 | ->expects($this->once()) |
||
38 | ->method('getUrl') |
||
39 | ->willReturn('http://fake.com') |
||
40 | ; |
||
41 | $request |
||
42 | ->expects($this->once()) |
||
43 | ->method('setUrl') |
||
44 | ->with($this->equalTo('http://fake.com?key=SOME_YOUTUBE_API_KEY')) |
||
45 | ; |
||
46 | $auth->auth($request); |
||
47 | } |
||
48 | } |
||
49 |