@@ -631,44 +631,32 @@ public function testGettersAndSetters()
631631
632632 public function testConnectionStrings ()
633633 {
634- $ this ->credis ->close ();
635634 $ this ->credis = new Credis_Client ('tcp:// ' .$ this ->redisConfig [0 ]['host ' ] . ': ' . $ this ->redisConfig [0 ]['port ' ]);
636- if ($ this ->useStandalone ) {
637- $ this ->credis ->forceStandalone ();
638- }
639635 $ this ->assertEquals ($ this ->credis ->getHost (),$ this ->redisConfig [0 ]['host ' ]);
640636 $ this ->assertEquals ($ this ->credis ->getPort (),$ this ->redisConfig [0 ]['port ' ]);
641637 $ this ->credis = new Credis_Client ('tcp:// ' .$ this ->redisConfig [0 ]['host ' ]);
642- if ($ this ->useStandalone ) {
643- $ this ->credis ->forceStandalone ();
644- }
645- $ this ->assertEquals ($ this ->credis ->getPort (),$ this ->redisConfig [0 ]['port ' ]);
638+ $ this ->assertEquals ($ this ->credis ->getPort (),6379 );
646639 $ this ->credis = new Credis_Client ('tcp:// ' .$ this ->redisConfig [0 ]['host ' ] . ': ' . $ this ->redisConfig [0 ]['port ' ] . '/abc123 ' );
647- if ($ this ->useStandalone ) {
648- $ this ->credis ->forceStandalone ();
649- }
650- $ this ->assertEquals ('abc123 ' ,$ this ->credis ->getPersistence ());
640+ $ this ->assertEquals ($ this ->credis ->getPersistence (),'abc123 ' );
641+ $ this ->credis = new Credis_Client ('tcp:// ' .$ this ->redisConfig [0 ]['host ' ],6380 );
642+ $ this ->assertEquals ($ this ->credis ->getPort (),6380 );
643+ $ this ->credis = new Credis_Client ('tcp:// ' .$ this ->redisConfig [0 ]['host ' ],NULL ,NULL ,"abc123 " );
644+ $ this ->assertEquals ($ this ->credis ->getPersistence (),'abc123 ' );
651645 }
652646
653647 public function testConnectionStringsTls ()
654648 {
655- $ this ->credis ->close ();
656649 $ this ->credis = new Credis_Client ('tls:// ' .$ this ->redisConfig [0 ]['host ' ] . ': ' . $ this ->redisConfig [0 ]['port ' ]);
657- if ($ this ->useStandalone ) {
658- $ this ->credis ->forceStandalone ();
659- }
660650 $ this ->assertEquals ($ this ->credis ->getHost (),$ this ->redisConfig [0 ]['host ' ]);
661651 $ this ->assertEquals ($ this ->credis ->getPort (),$ this ->redisConfig [0 ]['port ' ]);
662652 $ this ->credis = new Credis_Client ('tls:// ' .$ this ->redisConfig [0 ]['host ' ]);
663- if ($ this ->useStandalone ) {
664- $ this ->credis ->forceStandalone ();
665- }
666- $ this ->assertEquals ($ this ->credis ->getPort (),$ this ->redisConfig [0 ]['port ' ]);
653+ $ this ->assertEquals ($ this ->credis ->getPort (),6379 );
667654 $ this ->credis = new Credis_Client ('tls:// ' .$ this ->redisConfig [0 ]['host ' ] . ': ' . $ this ->redisConfig [0 ]['port ' ] . '/abc123 ' );
668- if ($ this ->useStandalone ) {
669- $ this ->credis ->forceStandalone ();
670- }
671- $ this ->assertEquals ('abc123 ' ,$ this ->credis ->getPersistence ());
655+ $ this ->assertEquals ($ this ->credis ->getPersistence (),'abc123 ' );
656+ $ this ->credis = new Credis_Client ('tls:// ' .$ this ->redisConfig [0 ]['host ' ],6380 );
657+ $ this ->assertEquals ($ this ->credis ->getPort (),6380 );
658+ $ this ->credis = new Credis_Client ('tls:// ' .$ this ->redisConfig [0 ]['host ' ],NULL ,NULL ,"abc123 " );
659+ $ this ->assertEquals ($ this ->credis ->getPersistence (),'abc123 ' );
672660 }
673661
674662 /**
0 commit comments