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