3 namespace Friendica\Test\Util;
5 use Friendica\Model\User\Cookie;
8 * Overrides the Cookie class so all cookie information will be saved to a static public variable
10 class StaticCookie extends Cookie
12 /** @var array static Cookie array mock */
13 public static $_COOKIE = [];
14 /** @var int The last expire time set */
15 public static $_EXPIRE;
17 protected function setCookie(string $name, string $value = null, int $expire = null, bool $secure = null)
19 self::$_COOKIE[$name] = $value;
20 self::$_EXPIRE = $expire;
23 public static function clearStatic()
25 self::$_EXPIRE = null;