Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarius Meissner <marius.meissner@sixt.com>2018-03-01 13:14:38 +0300
committerMarius Meissner <marius.meissner@sixt.com>2018-03-01 13:14:38 +0300
commitd8a44723b5a6ab177ea93fff22b6ea4609e28fee (patch)
treee1359bfb274e8e0ddb223e0261c244b714b394db /tests
parentf4cb95ceef6e90375e7248e7419ee60f0226a6fd (diff)
Removed unused variables + added assertion if session key changed
Diffstat (limited to 'tests')
-rw-r--r--tests/RedisTest.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/RedisTest.php b/tests/RedisTest.php
index 6b8858c7..38a747cf 100644
--- a/tests/RedisTest.php
+++ b/tests/RedisTest.php
@@ -5292,40 +5292,44 @@ class Redis_Test extends TestSuite
public function testSession_regenerateSessionId_noLock_noDestroy() {
$this->setSessionHandler();
$sessionId = $this->generateSessionId();
- $writeSuccessful = $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
+ $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
$newSessionId = $this->regenerateSessionId($sessionId);
-
+
+ $this->assertTrue($newSessionId !== $sessionId);
$this->assertEquals('bar', $this->getSessionData($newSessionId));
}
public function testSession_regenerateSessionId_noLock_withDestroy() {
$this->setSessionHandler();
$sessionId = $this->generateSessionId();
- $writeSuccessful = $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
+ $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
$newSessionId = $this->regenerateSessionId($sessionId, false, true);
-
+
+ $this->assertTrue($newSessionId !== $sessionId);
$this->assertEquals('bar', $this->getSessionData($newSessionId));
}
public function testSession_regenerateSessionId_withLock_noDestroy() {
$this->setSessionHandler();
$sessionId = $this->generateSessionId();
- $writeSuccessful = $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
+ $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
$newSessionId = $this->regenerateSessionId($sessionId, true);
-
+
+ $this->assertTrue($newSessionId !== $sessionId);
$this->assertEquals('bar', $this->getSessionData($newSessionId));
}
public function testSession_regenerateSessionId_withLock_withDestroy() {
$this->setSessionHandler();
$sessionId = $this->generateSessionId();
- $writeSuccessful = $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
+ $this->startSessionProcess($sessionId, 0, false, 300, true, null, -1, 1, 'bar');
$newSessionId = $this->regenerateSessionId($sessionId, true, true);
+ $this->assertTrue($newSessionId !== $sessionId);
$this->assertEquals('bar', $this->getSessionData($newSessionId));
}