Ejemplo n.º 1
0
 /**
  * test CCSession::delete 
  */
 public function test_delete()
 {
     CCSession::set('a', 'b');
     CCSession::set('a', 'c', 'file');
     $this->assertTrue(CCSession::has('a'));
     $this->assertTrue(CCSession::has('a', 'file'));
     CCSession::delete('a');
     CCSession::delete('a', 'file');
     $this->assertFalse(CCSession::has('a'));
     $this->assertFalse(CCSession::has('a', 'file'));
 }
Ejemplo n.º 2
0
 /**
  * When loading the alerts we going to add alerts
  * from the previous request stored in the session
  *
  * @return void
  */
 public static function _init()
 {
     if (\CCSession::has('ui.alerts')) {
         static::$_alerts = \CCSession::once('ui.alerts', array());
     }
 }