diff options
author | Marius Meissner <marius.meissner@sixt.com> | 2018-03-01 13:14:38 +0300 |
---|---|---|
committer | Marius Meissner <marius.meissner@sixt.com> | 2018-03-01 13:14:38 +0300 |
commit | d8a44723b5a6ab177ea93fff22b6ea4609e28fee (patch) | |
tree | e1359bfb274e8e0ddb223e0261c244b714b394db /tests | |
parent | f4cb95ceef6e90375e7248e7419ee60f0226a6fd (diff) |
Removed unused variables + added assertion if session key changed
Diffstat (limited to 'tests')
-rw-r--r-- | tests/RedisTest.php | 18 |
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)); } |