@@ -78,7 +78,7 @@ public function testFromDsnWithTls()
78
78
$ redis ->expects ($ this ->once ())
79
79
->method ('connect ' )
80
80
->with ('tls://127.0.0.1 ' , 6379 )
81
- ->willReturn (null );
81
+ ->willReturn (true );
82
82
83
83
Connection::fromDsn ('redis://127.0.0.1?tls=1 ' , [], $ redis );
84
84
}
@@ -92,7 +92,7 @@ public function testFromDsnWithTlsOption()
92
92
$ redis ->expects ($ this ->once ())
93
93
->method ('connect ' )
94
94
->with ('tls://127.0.0.1 ' , 6379 )
95
- ->willReturn (null );
95
+ ->willReturn (true );
96
96
97
97
Connection::fromDsn ('redis://127.0.0.1 ' , ['tls ' => true ], $ redis );
98
98
}
@@ -103,7 +103,7 @@ public function testFromDsnWithRedissScheme()
103
103
$ redis ->expects ($ this ->once ())
104
104
->method ('connect ' )
105
105
->with ('tls://127.0.0.1 ' , 6379 )
106
- ->willReturn (null );
106
+ ->willReturn (true );
107
107
108
108
Connection::fromDsn ('rediss://127.0.0.1 ' , [], $ redis );
109
109
}
@@ -315,7 +315,7 @@ public function testMaxEntries()
315
315
316
316
$ redis ->expects ($ this ->exactly (1 ))->method ('xadd ' )
317
317
->with ('queue ' , '* ' , ['message ' => '{"body":"1","headers":[]} ' ], 20000 , true )
318
- ->willReturn (1 );
318
+ ->willReturn (' 1 ' );
319
319
320
320
$ connection = Connection::fromDsn ('redis://localhost/queue?stream_max_entries=20000 ' , [], $ redis ); // 1 = always
321
321
$ connection ->add ('1 ' , []);
@@ -327,10 +327,10 @@ public function testDeleteAfterAck()
327
327
328
328
$ redis ->expects ($ this ->exactly (1 ))->method ('xack ' )
329
329
->with ('queue ' , 'symfony ' , ['1 ' ])
330
- ->willReturn (1 );
330
+ ->willReturn (' 1 ' );
331
331
$ redis ->expects ($ this ->exactly (1 ))->method ('xdel ' )
332
332
->with ('queue ' , ['1 ' ])
333
- ->willReturn (1 );
333
+ ->willReturn (' 1 ' );
334
334
335
335
$ connection = Connection::fromDsn ('redis://localhost/queue?delete_after_ack=true ' , [], $ redis ); // 1 = always
336
336
$ connection ->ack ('1 ' );
@@ -342,10 +342,10 @@ public function testDeleteAfterReject()
342
342
343
343
$ redis ->expects ($ this ->exactly (1 ))->method ('xack ' )
344
344
->with ('queue ' , 'symfony ' , ['1 ' ])
345
- ->willReturn (1 );
345
+ ->willReturn (' 1 ' );
346
346
$ redis ->expects ($ this ->exactly (1 ))->method ('xdel ' )
347
347
->with ('queue ' , ['1 ' ])
348
- ->willReturn (1 );
348
+ ->willReturn (' 1 ' );
349
349
350
350
$ connection = Connection::fromDsn ('redis://localhost/queue?delete_after_reject=true ' , [], $ redis ); // 1 = always
351
351
$ connection ->reject ('1 ' );
@@ -355,8 +355,8 @@ public function testLastErrorGetsCleared()
355
355
{
356
356
$ redis = $ this ->createMock (\Redis::class);
357
357
358
- $ redis ->expects ($ this ->once ())->method ('xadd ' )->willReturn (0 );
359
- $ redis ->expects ($ this ->once ())->method ('xack ' )->willReturn (0 );
358
+ $ redis ->expects ($ this ->once ())->method ('xadd ' )->willReturn (' 0 ' );
359
+ $ redis ->expects ($ this ->once ())->method ('xack ' )->willReturn (' 0 ' );
360
360
361
361
$ redis ->method ('getLastError ' )->willReturnOnConsecutiveCalls ('xadd error ' , 'xack error ' );
362
362
$ redis ->expects ($ this ->exactly (2 ))->method ('clearLastError ' );
0 commit comments