|
@@ 32-45 (lines=14) @@
|
| 29 |
|
} |
| 30 |
|
} |
| 31 |
|
|
| 32 |
|
public function testNotifyRequest() |
| 33 |
|
{ |
| 34 |
|
$method = 'notify'; |
| 35 |
|
$params = ['foo'=>true]; |
| 36 |
|
$request = $this->client->notification($method, $params); |
| 37 |
|
$response = $this->client->send($request); |
| 38 |
|
|
| 39 |
|
$this->assertEquals(ClientInterface::SPEC, $request->getRpcVersion()); |
| 40 |
|
$this->assertEquals(null, $request->getRpcId()); |
| 41 |
|
$this->assertEquals($method, $request->getRpcMethod()); |
| 42 |
|
$this->assertEquals($params, $request->getRpcParams()); |
| 43 |
|
|
| 44 |
|
$this->assertNull($response); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
public function testAsyncNotifyRequest() |
| 48 |
|
{ |
|
@@ 64-77 (lines=14) @@
|
| 61 |
|
}); |
| 62 |
|
} |
| 63 |
|
|
| 64 |
|
public function testNotifyRequestWithInvalidParams() |
| 65 |
|
{ |
| 66 |
|
$method = 'notify'; |
| 67 |
|
$params = ['foo'=>'bar']; |
| 68 |
|
$request = $this->client->notification($method, $params); |
| 69 |
|
$response = $this->client->send($request); |
| 70 |
|
|
| 71 |
|
$this->assertEquals(ClientInterface::SPEC, $request->getRpcVersion()); |
| 72 |
|
$this->assertEquals(null, $request->getRpcId()); |
| 73 |
|
$this->assertEquals($method, $request->getRpcMethod()); |
| 74 |
|
$this->assertEquals($params, $request->getRpcParams()); |
| 75 |
|
|
| 76 |
|
$this->assertNull($response); |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
public function testAsyncNotifyRequestWithInvalidParams() |
| 80 |
|
{ |