File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ class Redis_Test extends PHPUnit_Framework_TestCase
7
7
{
8
8
const HOST = '127.0.0.1 ' ;
9
9
const PORT = 6379 ;
10
+ const AUTH = 'password ' ;
11
+
10
12
/**
11
13
* @var Redis
12
14
*/
@@ -20,7 +22,9 @@ public function setUp()
20
22
private function newInstance () {
21
23
$ r = new Redis ();
22
24
$ r ->connect (self ::HOST , self ::PORT );
23
-
25
+ if (self ::AUTH ) {
26
+ $ r ->auth (self ::AUTH );
27
+ }
24
28
// uncomment the following if you want to use authentication
25
29
// $this->assertTrue($r->auth('foobared'));
26
30
@@ -534,6 +538,9 @@ public function testblockingPop() {
534
538
sleep(2);
535
539
$r = new Redis;
536
540
$r->connect(" ' .self ::HOST .'", ' .self ::PORT .');
541
+ if( ' .self ::AUTH .') {
542
+ $r->auth( ' .self ::AUTH .');
543
+ }
537
544
$r->lPush($_ENV["PHPREDIS_key"], $_ENV["PHPREDIS_value"]);
538
545
?> ' );
539
546
fclose ($ pipes [0 ]);
You can’t perform that action at this time.
0 commit comments