@@ -46,7 +46,7 @@ public function testSending(): void
4646 $ this ->serializer ->expects ($ this ->once ())->method ('getRequestMessage ' )->with ($ this ->equalTo ('ping ' ))->will ($ this ->returnValue ('message ' ));
4747 $ this ->stream ->expects ($ this ->once ())->method ('write ' )->with ($ this ->equalTo ('message ' ));
4848
49- $ this ->redis ->ping ( );
49+ $ this ->redis ->callAsync ( ' ping ' );
5050 }
5151
5252 public function testClosingClientEmitsEvent (): void
@@ -121,7 +121,7 @@ public function testPingPong(): void
121121 {
122122 $ this ->serializer ->expects ($ this ->once ())->method ('getRequestMessage ' )->with ($ this ->equalTo ('ping ' ));
123123
124- $ promise = $ this ->redis ->ping ( );
124+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
125125
126126 $ this ->redis ->handleMessage (new BulkReply ('PONG ' ));
127127
@@ -131,7 +131,7 @@ public function testPingPong(): void
131131
132132 public function testMonitorCommandIsNotSupported (): void
133133 {
134- $ promise = $ this ->redis ->monitor ( );
134+ $ promise = $ this ->redis ->callAsync ( ' monitor ' );
135135
136136 $ promise ->then (null , $ this ->expectCallableOnceWith (
137137 $ this ->logicalAnd (
@@ -148,7 +148,7 @@ public function testMonitorCommandIsNotSupported(): void
148148
149149 public function testErrorReply (): void
150150 {
151- $ promise = $ this ->redis ->invalid ( );
151+ $ promise = $ this ->redis ->callAsync ( ' invalid ' );
152152
153153 $ err = new ErrorReply ("ERR unknown command 'invalid' " );
154154 $ this ->redis ->handleMessage ($ err );
@@ -158,7 +158,7 @@ public function testErrorReply(): void
158158
159159 public function testClosingClientRejectsAllRemainingRequests (): void
160160 {
161- $ promise = $ this ->redis ->ping ( );
161+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
162162 $ this ->redis ->close ();
163163
164164 $ promise ->then (null , $ this ->expectCallableOnceWith (
@@ -183,7 +183,7 @@ public function testClosingStreamRejectsAllRemainingRequests(): void
183183 assert ($ this ->serializer instanceof SerializerInterface);
184184 $ this ->redis = new StreamingClient ($ stream , $ this ->parser , $ this ->serializer );
185185
186- $ promise = $ this ->redis ->ping ( );
186+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
187187 $ stream ->close ();
188188
189189 $ promise ->then (null , $ this ->expectCallableOnceWith (
@@ -201,9 +201,9 @@ public function testClosingStreamRejectsAllRemainingRequests(): void
201201
202202 public function testEndingClientRejectsAllNewRequests (): void
203203 {
204- $ this ->redis ->ping ( );
204+ $ this ->redis ->callAsync ( ' ping ' );
205205 $ this ->redis ->end ();
206- $ promise = $ this ->redis ->ping ( );
206+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
207207
208208 $ promise ->then (null , $ this ->expectCallableOnceWith (
209209 $ this ->logicalAnd (
@@ -221,7 +221,7 @@ public function testEndingClientRejectsAllNewRequests(): void
221221 public function testClosedClientRejectsAllNewRequests (): void
222222 {
223223 $ this ->redis ->close ();
224- $ promise = $ this ->redis ->ping ( );
224+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
225225
226226 $ promise ->then (null , $ this ->expectCallableOnceWith (
227227 $ this ->logicalAnd (
@@ -250,7 +250,7 @@ public function testEndingBusyClosesClientWhenNotBusyAnymore(): void
250250 ++$ closed ;
251251 });
252252
253- $ promise = $ this ->redis ->ping ( );
253+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
254254 $ this ->assertEquals (0 , $ closed );
255255
256256 $ this ->redis ->end ();
@@ -277,7 +277,7 @@ public function testReceivingUnexpectedMessageThrowsException(): void
277277
278278 public function testPubsubSubscribe (): StreamingClient
279279 {
280- $ promise = $ this ->redis ->subscribe ( 'test ' );
280+ $ promise = $ this ->redis ->callAsync ( ' subscribe ' , 'test ' );
281281 $ this ->expectPromiseResolve ($ promise );
282282
283283 $ this ->redis ->on ('subscribe ' , $ this ->expectCallableOnce ());
@@ -291,7 +291,7 @@ public function testPubsubSubscribe(): StreamingClient
291291 */
292292 public function testPubsubPatternSubscribe (StreamingClient $ client ): StreamingClient
293293 {
294- $ promise = $ client ->psubscribe ( 'demo_* ' );
294+ $ promise = $ client ->callAsync ( ' psubscribe ' , 'demo_* ' );
295295 $ this ->expectPromiseResolve ($ promise );
296296
297297 $ client ->on ('psubscribe ' , $ this ->expectCallableOnce ());
@@ -311,7 +311,7 @@ public function testPubsubMessage(StreamingClient $client): void
311311
312312 public function testSubscribeWithMultipleArgumentsRejects (): void
313313 {
314- $ promise = $ this ->redis ->subscribe ( 'a ' , 'b ' );
314+ $ promise = $ this ->redis ->callAsync ( ' subscribe ' , 'a ' , 'b ' );
315315
316316 $ promise ->then (null , $ this ->expectCallableOnceWith (
317317 $ this ->logicalAnd (
@@ -328,7 +328,7 @@ public function testSubscribeWithMultipleArgumentsRejects(): void
328328
329329 public function testUnsubscribeWithoutArgumentsRejects (): void
330330 {
331- $ promise = $ this ->redis ->unsubscribe ( );
331+ $ promise = $ this ->redis ->callAsync ( ' unsubscribe ' );
332332
333333 $ promise ->then (null , $ this ->expectCallableOnceWith (
334334 $ this ->logicalAnd (
0 commit comments