Tests/AbstractRpcTest.php 1 location
|
@@ 19-27 (lines=9) @@
|
| 16 |
|
* |
| 17 |
|
* @return RpcRequestInterface |
| 18 |
|
*/ |
| 19 |
|
protected function getRequestMock($method, array $params = []) |
| 20 |
|
{ |
| 21 |
|
$request = $this->prophesize(RpcRequestInterface::class); |
| 22 |
|
$request->getMethod()->willReturn($method); |
| 23 |
|
$request->getParameters()->willReturn((object)$params); |
| 24 |
|
|
| 25 |
|
|
| 26 |
|
return $request->reveal(); |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
/** |
| 30 |
|
* @param array $data |
Tests/RpcMockClientTest.php 1 location
|
@@ 98-105 (lines=8) @@
|
| 95 |
|
* |
| 96 |
|
* @return RpcRequestInterface |
| 97 |
|
*/ |
| 98 |
|
private function createRequestMock($method, $parameters = null) |
| 99 |
|
{ |
| 100 |
|
$mock = $this->prophesize(RpcRequestInterface::class); |
| 101 |
|
$mock->getMethod()->willReturn((string)$method); |
| 102 |
|
$mock->getParameters()->willReturn($parameters); |
| 103 |
|
|
| 104 |
|
return $mock->reveal(); |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
/** |
| 108 |
|
* @param bool $success |