Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class ClientTest extends BaseCase |
||
15 | { |
||
16 | public function testListIds() |
||
17 | { |
||
18 | $client = $this->mockApiClient(Client::class); |
||
19 | $client->expects()->httpGet('/department/list_ids', [ |
||
20 | 'id' => 1 |
||
21 | ])->andReturn('mock-result')->once(); |
||
22 | $this->assertSame('mock-result', $client->listIds(1)); |
||
23 | } |
||
24 | |||
25 | public function testList() |
||
26 | { |
||
27 | $client = $this->mockApiClient(Client::class); |
||
28 | $client->expects()->httpGet('/department/list', [ |
||
29 | 'id' => 1, |
||
30 | 'fetch_child' => false, |
||
31 | 'lang' => 'zh_CN' |
||
32 | ])->andReturn('mock-result')->once(); |
||
33 | $this->assertSame('mock-result', $client->list(1)); |
||
34 | } |
||
36 |