public static function destroy() { if (!empty($_SESSION)) { $_SESSION = []; } session_unset(); session_destroy(); self::$init = null; }
/** * @covers think\Session::destroy * * @todo Implement testDestroy(). */ public function testDestroy() { \think\Session::set('sessionnamedestroy', 'sessionvalue'); \think\Session::destroy(); $this->assertEmpty($_SESSION['sessionnamedestroy']); }