X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2FUtil%2FStaticCookie.php;h=a66025bf543958a7518ca8eafbfd76f8cc3b6917;hb=fb1e8e75f5eef9c4e05bec047bda6077e6c275de;hp=01a8c49be46d825072232fc70ad3836461a2f6d9;hpb=6e4a428c7394ecb82675ce223a87daf721e6894b;p=friendica.git diff --git a/tests/Util/StaticCookie.php b/tests/Util/StaticCookie.php index 01a8c49be4..a66025bf54 100644 --- a/tests/Util/StaticCookie.php +++ b/tests/Util/StaticCookie.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica\Test\Util; @@ -14,10 +33,26 @@ class StaticCookie extends Cookie /** @var int The last expire time set */ public static $_EXPIRE; - protected function setCookie(string $name, string $value = null, int $expire = null, bool $secure = null) + /** + * Send a cookie - protected, internal function for test-mocking possibility + * + * @param string $value [optional] + * @param int $expire [optional] + * @param bool $secure [optional] + * @return bool + * + * @noinspection PhpMissingParentCallCommonInspection + * + * @link https://php.net/manual/en/function.setcookie.php + * + * @see Cookie::setCookie() + */ + protected function setCookie(string $value = null, int $expire = null, bool $secure = null): bool { - self::$_COOKIE[$name] = $value; + self::$_COOKIE[self::NAME] = $value; self::$_EXPIRE = $expire; + + return true; } public static function clearStatic()