예제 #1
0
파일: MemoryTest.php 프로젝트: fwk/security
 /**
  */
 public function testRemove()
 {
     $user = new TestUser(1, 'joe2083');
     $user2 = new TestUser(2, 'bar201');
     $this->assertFalse($this->object->has($user));
     $this->object->add($user);
     $this->assertTrue($this->object->has($user));
     $this->object->remove($user);
     $this->assertFalse($this->object->has($user));
 }
예제 #2
0
 /**
  * @param string $key
  */
 public function remove($key)
 {
     // also remove it from $_SESSION to prevent re-setting the old value during the merge
     if (isset($_SESSION[$key])) {
         unset($_SESSION[$key]);
     }
     parent::remove($key);
 }