예제 #1
0
 public function testDestroy()
 {
     $this->handler->write('456', 'data');
     $this->handler->destroy('123');
     $this->assertEquals('data', $this->handler->read('456'));
     $this->handler->destroy('456');
     $this->assertEmpty($this->handler->read('456'));
 }
예제 #2
0
 /**
  * Reads session from storage and loads session.
  */
 private function read()
 {
     $data = $this->handler->read($this->id);
     $this->data = $data ? unserialize($data) : array();
     $this->loadSession();
 }