clear() public method

Optionally it also clears the session id and renews the session.
public clear ( boolean $renew = false ) : void
$renew boolean If session should be renewed, as well. Defaults to false.
return void
Beispiel #1
0
 /**
  * testClear method
  *
  * @return void
  */
 public function testClear()
 {
     $session = new Session();
     $session->write('Delete.me', 'Clearing out');
     $session->clear();
     $this->assertFalse($session->check('Delete.me'));
     $this->assertFalse($session->check('Delete'));
 }