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