示例#1
0
 public function testBatchNotifications()
 {
     $server = new Server('[
         {"jsonrpc": "2.0", "method": "notify_sum", "params": [1,2,4]},
         {"jsonrpc": "2.0", "method": "notify_hello", "params": [7]}
     ]');
     $server->unregisterAll();
     $server->register('notify_sum', function ($a, $b, $c) {
     });
     $server->register('notify_hello', function ($id) {
     });
     $this->assertEquals('', $server->execute());
 }