@@ -46,7 +46,7 @@ public function testSending(): void
46
46
$ this ->serializer ->expects ($ this ->once ())->method ('getRequestMessage ' )->with ($ this ->equalTo ('ping ' ))->will ($ this ->returnValue ('message ' ));
47
47
$ this ->stream ->expects ($ this ->once ())->method ('write ' )->with ($ this ->equalTo ('message ' ));
48
48
49
- $ this ->redis ->ping ( );
49
+ $ this ->redis ->callAsync ( ' ping ' );
50
50
}
51
51
52
52
public function testClosingClientEmitsEvent (): void
@@ -121,7 +121,7 @@ public function testPingPong(): void
121
121
{
122
122
$ this ->serializer ->expects ($ this ->once ())->method ('getRequestMessage ' )->with ($ this ->equalTo ('ping ' ));
123
123
124
- $ promise = $ this ->redis ->ping ( );
124
+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
125
125
126
126
$ this ->redis ->handleMessage (new BulkReply ('PONG ' ));
127
127
@@ -131,7 +131,7 @@ public function testPingPong(): void
131
131
132
132
public function testMonitorCommandIsNotSupported (): void
133
133
{
134
- $ promise = $ this ->redis ->monitor ( );
134
+ $ promise = $ this ->redis ->callAsync ( ' monitor ' );
135
135
136
136
$ promise ->then (null , $ this ->expectCallableOnceWith (
137
137
$ this ->logicalAnd (
@@ -148,7 +148,7 @@ public function testMonitorCommandIsNotSupported(): void
148
148
149
149
public function testErrorReply (): void
150
150
{
151
- $ promise = $ this ->redis ->invalid ( );
151
+ $ promise = $ this ->redis ->callAsync ( ' invalid ' );
152
152
153
153
$ err = new ErrorReply ("ERR unknown command 'invalid' " );
154
154
$ this ->redis ->handleMessage ($ err );
@@ -158,7 +158,7 @@ public function testErrorReply(): void
158
158
159
159
public function testClosingClientRejectsAllRemainingRequests (): void
160
160
{
161
- $ promise = $ this ->redis ->ping ( );
161
+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
162
162
$ this ->redis ->close ();
163
163
164
164
$ promise ->then (null , $ this ->expectCallableOnceWith (
@@ -183,7 +183,7 @@ public function testClosingStreamRejectsAllRemainingRequests(): void
183
183
assert ($ this ->serializer instanceof SerializerInterface);
184
184
$ this ->redis = new StreamingClient ($ stream , $ this ->parser , $ this ->serializer );
185
185
186
- $ promise = $ this ->redis ->ping ( );
186
+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
187
187
$ stream ->close ();
188
188
189
189
$ promise ->then (null , $ this ->expectCallableOnceWith (
@@ -201,9 +201,9 @@ public function testClosingStreamRejectsAllRemainingRequests(): void
201
201
202
202
public function testEndingClientRejectsAllNewRequests (): void
203
203
{
204
- $ this ->redis ->ping ( );
204
+ $ this ->redis ->callAsync ( ' ping ' );
205
205
$ this ->redis ->end ();
206
- $ promise = $ this ->redis ->ping ( );
206
+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
207
207
208
208
$ promise ->then (null , $ this ->expectCallableOnceWith (
209
209
$ this ->logicalAnd (
@@ -221,7 +221,7 @@ public function testEndingClientRejectsAllNewRequests(): void
221
221
public function testClosedClientRejectsAllNewRequests (): void
222
222
{
223
223
$ this ->redis ->close ();
224
- $ promise = $ this ->redis ->ping ( );
224
+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
225
225
226
226
$ promise ->then (null , $ this ->expectCallableOnceWith (
227
227
$ this ->logicalAnd (
@@ -250,7 +250,7 @@ public function testEndingBusyClosesClientWhenNotBusyAnymore(): void
250
250
++$ closed ;
251
251
});
252
252
253
- $ promise = $ this ->redis ->ping ( );
253
+ $ promise = $ this ->redis ->callAsync ( ' ping ' );
254
254
$ this ->assertEquals (0 , $ closed );
255
255
256
256
$ this ->redis ->end ();
@@ -277,7 +277,7 @@ public function testReceivingUnexpectedMessageThrowsException(): void
277
277
278
278
public function testPubsubSubscribe (): StreamingClient
279
279
{
280
- $ promise = $ this ->redis ->subscribe ( 'test ' );
280
+ $ promise = $ this ->redis ->callAsync ( ' subscribe ' , 'test ' );
281
281
$ this ->expectPromiseResolve ($ promise );
282
282
283
283
$ this ->redis ->on ('subscribe ' , $ this ->expectCallableOnce ());
@@ -291,7 +291,7 @@ public function testPubsubSubscribe(): StreamingClient
291
291
*/
292
292
public function testPubsubPatternSubscribe (StreamingClient $ client ): StreamingClient
293
293
{
294
- $ promise = $ client ->psubscribe ( 'demo_* ' );
294
+ $ promise = $ client ->callAsync ( ' psubscribe ' , 'demo_* ' );
295
295
$ this ->expectPromiseResolve ($ promise );
296
296
297
297
$ client ->on ('psubscribe ' , $ this ->expectCallableOnce ());
@@ -311,7 +311,7 @@ public function testPubsubMessage(StreamingClient $client): void
311
311
312
312
public function testSubscribeWithMultipleArgumentsRejects (): void
313
313
{
314
- $ promise = $ this ->redis ->subscribe ( 'a ' , 'b ' );
314
+ $ promise = $ this ->redis ->callAsync ( ' subscribe ' , 'a ' , 'b ' );
315
315
316
316
$ promise ->then (null , $ this ->expectCallableOnceWith (
317
317
$ this ->logicalAnd (
@@ -328,7 +328,7 @@ public function testSubscribeWithMultipleArgumentsRejects(): void
328
328
329
329
public function testUnsubscribeWithoutArgumentsRejects (): void
330
330
{
331
- $ promise = $ this ->redis ->unsubscribe ( );
331
+ $ promise = $ this ->redis ->callAsync ( ' unsubscribe ' );
332
332
333
333
$ promise ->then (null , $ this ->expectCallableOnceWith (
334
334
$ this ->logicalAnd (
0 commit comments