Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
31 | public function testSendRequest(string $methodName): void |
||
32 | { |
||
33 | // setup |
||
34 | $client = $this->getMock([ |
||
35 | 'sendPostRequest' |
||
36 | ]); |
||
37 | $client->method('sendPostRequest')->willReturn([ |
||
38 | 'return', |
||
39 | 1 |
||
40 | ]); |
||
41 | $client->setPutTraitMethod(true); |
||
42 | $client->setDeleteTraitMethod(true); |
||
43 | |||
44 | // test body |
||
45 | $result = $client->$methodName('/end-point/'); |
||
46 | |||
47 | // assertions |
||
48 | $this->assertEquals('return', $result[0]); |
||
49 | } |
||
51 |