8000 Test for calling connect multiple times on the same object · jrtkcoder/phpredis@6c1101f · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c1101f

Browse files
Test for calling connect multiple times on the same object
1 parent 335c058 commit 6c1101f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/RedisClusterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function testSortDesc() { return $this->markTestSkipped(); }
3232
public function testWait() { return $this->markTestSkipped(); }
3333
public function testSelect() { return $this->markTestSkipped(); }
3434
public function testReconnectSelect() { return $this->markTestSkipped(); }
35+
public function testMultipleConnect() { return $this->markTestSkipped(); }
3536

3637
/* Load our seeds on construction */
3738
public function __construct() {

tests/RedisTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4974,5 +4974,15 @@ public function testSession()
49744974
session_write_close();
49754975
$this->assertTrue($this->redis->exists('PHPREDIS_SESSION:' . session_id()));
49764976
}
4977+
4978+
public function testMultipleConnect() {
4979+
$host = $this->redis->GetHost();
4980+
$port = $this->redis->GetPort();
4981+
4982+
for($i = 0; $i < 5; $i++) {
4983+
$this->redis->connect($host, $port);
4984+
$this->assertEquals($this->redis->ping(), "+PONG");
4985+
}
4986+
}
49774987
}
49784988
?>

0 commit comments

Comments
 (0)
0