| @@ 31-38 (lines=8) @@ | ||
| 28 | $this->assertInstanceOf('Psr\Http\Message\RequestInterface', new Request('foo', 'bar')); |
|
| 29 | } |
|
| 30 | ||
| 31 | public function testGetRpcId() |
|
| 32 | { |
|
| 33 | $request = new Request('foo', 'bar', [], json_encode([ |
|
| 34 | 'id' => 123 |
|
| 35 | ])); |
|
| 36 | ||
| 37 | $this->assertEquals(123, $request->getRpcId()); |
|
| 38 | } |
|
| 39 | ||
| 40 | public function testGetRpcIdIsNull() |
|
| 41 | { |
|
| @@ 47-54 (lines=8) @@ | ||
| 44 | $this->assertNull($request->getRpcId()); |
|
| 45 | } |
|
| 46 | ||
| 47 | public function testGetRpcMethod() |
|
| 48 | { |
|
| 49 | $request = new Request('foo', 'bar', [], json_encode([ |
|
| 50 | 'method' => 'foo' |
|
| 51 | ])); |
|
| 52 | ||
| 53 | $this->assertEquals('foo', $request->getRpcMethod()); |
|
| 54 | } |
|
| 55 | ||
| 56 | public function testGetRpcMethodIsNull() |
|
| 57 | { |
|