Пример #1
0
 /**
  */
 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);
 }