read() public method

public read ( string $sessionId ) : string
$sessionId string Session variable name
return string
Exemplo n.º 1
0
 public function testShouldReadSession()
 {
     $sessionId = 'some_session_key';
     $session = new SessionHandler($this->getConfig());
     $data = [321 => microtime(true), 'def' => '678', 'xyz' => 'zyx'];
     $this->tester->haveInAerospike($sessionId, $data);
     $this->keys[] = $sessionId;
     $this->assertEquals($data, $session->read($sessionId));
 }
Exemplo n.º 2
0
 public function testShouldReadSession()
 {
     $sessionId = 'abcdef123458';
     $session = new SessionHandler($this->getConfig());
     $data = serialize([321 => microtime(true), 'def' => '678', 'xyz' => 'zyx']);
     $this->tester->haveInAerospike($sessionId, base64_encode($data));
     $this->keys[] = $sessionId;
     $expected = $session->read($sessionId);
     $this->assertEquals($data, $expected);
 }