Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function testUpdateNameMakesPutRequest() |
||
26 | { |
||
27 | $responseMock = $this->getMockBuilder('\GuzzleHttp\Message\Response') |
||
28 | ->disableOriginalConstructor()->getMock(); |
||
29 | $responseMock->expects($this->once())->method('json') |
||
30 | ->willReturn($this->returnValue(true)); |
||
31 | |||
32 | $guzzleClientMock = $this->getMockBuilder('\GuzzleHttp\Client') |
||
33 | ->disableOriginalConstructor()->getMock(); |
||
34 | $guzzleClientMock->expects($this->once())->method('put') |
||
35 | ->willReturn($responseMock); |
||
36 | |||
37 | $client = new Client('team', 'username', 'password'); |
||
38 | $client->setClient($guzzleClientMock); |
||
39 | |||
40 | $company = $client->company(3); |
||
41 | |||
42 | $company->updateName('name'); |
||
43 | } |
||
44 | |||
46 |