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