@@ -263,14 +263,14 @@ public function testConnectUnixSocket() {
263
263
$ port = 'bar ' ;
264
264
$ timeout = 0 ;
265
265
266
- $ Source ->config = array (
266
+ $ Source ->config = [
267
267
'unix_socket ' => $ unixSocket ,
268
268
'persistent ' => $ persistent ,
269
269
'host ' => $ host ,
270
270
'port ' => $ port ,
271
271
'timeout ' => $ timeout ,
272
- ) ;
273
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'connect ' ) );
272
+ ] ;
273
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'connect ' ] );
274
274
275
275
// Set expectations for connect calls
276
276
$ Source ->_connection ->expects ($ this ->once ())->method ('connect ' )
@@ -299,14 +299,14 @@ public function testConnectTcp() {
299
299
$ port = 'bar ' ;
300
300
$ timeout = 0 ;
301
301
302
- $ Source ->config = array (
302
+ $ Source ->config = [
303
303
'unix_socket ' => $ unixSocket ,
304
304
'persistent ' => $ persistent ,
305
305
'host ' => $ host ,
306
306
'port ' => $ port ,
307
307
'timeout ' => $ timeout ,
308
- ) ;
309
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'connect ' ) );
308
+ ] ;
309
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'connect ' ] );
310
310
311
311
// Set expectations for connect calls
312
312
$ Source ->_connection ->expects ($ this ->once ())->method ('connect ' )
@@ -336,14 +336,14 @@ public function testConnectTcpPersistent() {
336
336
$ port = 'bar ' ;
337
337
$ timeout = 0 ;
338
338
339
- $ Source ->config = array (
339
+ $ Source ->config = [
340
340
'unix_socket ' => $ unixSocket ,
341
341
'persistent ' => $ persistent ,
342
342
'host ' => $ host ,
343
343
'port ' => $ port ,
344
344
'timeout ' => $ timeout ,
345
- ) ;
346
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'pconnect ' ) );
345
+ ] ;
346
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'pconnect ' ] );
347
347
348
348
// Set expectations for pconnect calls
349
349
$ Source ->_connection ->expects ($ this ->once ())->method ('pconnect ' )
@@ -419,8 +419,8 @@ public function testNoAuthenticate() {
419
419
420
420
$ password = '' ;
421
421
422
- $ Source ->config = array ( 'password ' => $ password) ;
423
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'auth ' ) );
422
+ $ Source ->config = [ 'password ' => $ password] ;
423
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'auth ' ] );
424
424
425
425
// Set expectations for constructor calls
426
426
$ Source ->_connection ->expects ($ this ->never ())->method ('auth ' );
@@ -444,8 +444,8 @@ public function testSuccessfulAuthenticate() {
444
444
445
445
$ password = 'foo ' ;
446
446
447
- $ Source ->config = array ( 'password ' => $ password) ;
448
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'auth ' ) );
447
+ $ Source ->config = [ 'password ' => $ password] ;
448
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'auth ' ] );
449
449
450
450
// Set expectations for auth calls
451
451
$ Source ->_connection ->expects ($ this ->once ())->method ('auth ' )
@@ -470,8 +470,8 @@ public function testFailingAuthenticate() {
470
470
471
471
$ password = 'foo ' ;
472
472
473
- $ Source ->config = array ( 'password ' => $ password) ;
474
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'auth ' ) );
473
+ $ Source ->config = [ 'password ' => $ password] ;
474
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'auth ' ] );
475
475
476
476
// Set expectations for auth calls
477
477
$ Source ->_connection ->expects ($ this ->once ())->method ('auth ' )
@@ -496,8 +496,8 @@ public function testNoSelect() {
496
496
497
497
$ database = '' ;
498
498
499
- $ Source ->config = array ( 'database ' => $ database) ;
500
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'select ' ) );
499
+ $ Source ->config = [ 'database ' => $ database] ;
500
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'select ' ] );
501
501
502
502
// Set expectations for select calls
503
503
$ Source ->_connection ->expects ($ this ->never ())->method ('select ' );
@@ -521,8 +521,8 @@ public function testSuccessfulSelect() {
521
521
522
522
$ database = 'foo ' ;
523
523
524
- $ Source ->config = array ( 'database ' => $ database) ;
525
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'select ' ) );
524
+ $ Source ->config = [ 'database ' => $ database] ;
525
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'select ' ] );
526
526
527
527
// Set expectations for select calls
528
528
$ Source ->_connection ->expects ($ this ->once ())->method ('select ' )
@@ -547,8 +547,8 @@ public function testFailingSelect() {
547
547
548
548
$ database = 'foo ' ;
549
549
550
- $ Source ->config = array ( 'database ' => $ database) ;
551
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'select ' ) );
550
+ $ Source ->config = [ 'database ' => $ database] ;
551
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'select ' ] );
552
552
553
553
// Set expectations for select calls
554
554
$ Source ->_connection ->expects ($ this ->once ())->method ('select ' )
@@ -573,8 +573,8 @@ public function testNoSetPrefix() {
573
573
574
574
$ prefix = '' ;
575
575
576
- $ Source ->config = array ( 'prefix ' => $ prefix) ;
577
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'setOption ' ) );
576
+ $ Source ->config = [ 'prefix ' => $ prefix] ;
577
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'setOption ' ] );
578
578
579
579
// Set expectations for setOption calls
580
580
$ Source ->_connection ->expects ($ this ->never ())->method ('setOption ' );
@@ -598,8 +598,8 @@ public function testSuccessfulSetPrefix() {
598
598
599
599
$ prefix = 'foo ' ;
600
600
601
- $ Source ->config = array ( 'prefix ' => $ prefix) ;
602
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'setOption ' ) );
601
+ $ Source ->config = [ 'prefix ' => $ prefix] ;
602
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'setOption ' ] );
603
603
604
604
// Set expectations for setOption calls
605
605
$ Source ->_connection ->expects ($ this ->once ())->method ('setOption ' )
@@ -624,8 +624,8 @@ public function testFailingSetPrefix() {
624
624
625
625
$ prefix = 'foo ' ;
626
626
627
- $ Source ->config = array ( 'prefix ' => $ prefix) ;
628
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'setOption ' ) );
627
+ $ Source ->config = [ 'prefix ' => $ prefix] ;
628
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'setOption ' ] );
629
629
630
630
// Set expectations for setOption calls
631
631
$ Source ->_connection ->expects ($ this ->once ())->method ('setOption ' )
@@ -643,7 +643,7 @@ public function testCloseNotConnected() {
643
643
$ Source = new TestRedisSource ();
644
644
645
645
$ Source ->connected = false ;
646
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'close ' ) );
646
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'close ' ] );
647
647
648
648
// Set expectations for close calls
649
649
$ Source ->_connection ->expects ($ this ->never ())->method ('close ' );
@@ -659,7 +659,7 @@ public function testCloseConnected() {
659
659
$ Source = new TestRedisSource ();
660
660
661
661
$ Source ->connected = true ;
662
- $ Source ->_connection = $ this ->getMock ('Redis ' , array ( 'close ' ) );
662
+ $ Source ->_connection = $ this ->getMock ('Redis ' , [ 'close ' ] );
663
663
664
664
// Set expectations for close calls
665
665
$ Source ->_connection ->expects ($ this ->once ())->method ('close ' );
0 commit comments