File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -186,4 +186,22 @@ public function testPubsubMessage(Client $client)
186
186
$ client ->on ('message ' , $ this ->expectCallableOnce ());
187
187
$ client ->handleMessage (new MultiBulkReply (array (new BulkReply ('message ' ), new BulkReply ('test ' ), new BulkReply ('payload ' ))));
188
188
}
189
+
190
+ public function testPubsubSubscribeMultiple ()
191
+ {
192
+ $ this ->markTestIncomplete ();
193
+
194
+ $ promise = $ this ->client ->subscribe ('first ' , 'second ' );
195
+ $ this ->expectPromiseResolve ($ promise );
196
+
197
+ // expect two "subscribe" events
198
+ $ mock = $ this ->createCallableMock ();
199
+ $ mock ->expects ($ this ->exactly (2 ))->method ('__invoke ' );
200
+ $ this ->client ->on ('subscribe ' , $ mock );
201
+
202
+ $ this ->client ->handleMessage (new MultiBulkReply (array (new BulkReply ('subscribe ' ), new BulkReply ('first ' ), new IntegerReply (1 ))));
203
+ $ this ->client ->handleMessage (new MultiBulkReply (array (new BulkReply ('subscribe ' ), new BulkReply ('second ' ), new IntegerReply (2 ))));
204
+
205
+ return $ this ->client ;
206
+ }
189
207
}
You can’t perform that action at this time.
0 commit comments