]> git.mxchange.org Git - friendica.git/blobdiff - tests/Util/StaticCookie.php
XMPP URI and markdown are no friends (yet)
[friendica.git] / tests / Util / StaticCookie.php
index 01a8c49be46d825072232fc70ad3836461a2f6d9..6cfbdc3ab7df3d8757cbc9558b47072ffec19dd1 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Test\Util;
 
@@ -14,6 +33,20 @@ class StaticCookie extends Cookie
        /** @var int The last expire time set */
        public static $_EXPIRE;
 
+       /**
+        * Send a cookie - protected, internal function for test-mocking possibility
+        * @see Cookie::setCookie()
+        *
+        * @link  https://php.net/manual/en/function.setcookie.php
+        *
+        * @param string $name
+        * @param string $value  [optional]
+        * @param int    $expire [optional]
+        * @param bool   $secure [optional]
+        *
+        * @noinspection PhpMissingParentCallCommonInspection
+        *
+        */
        protected function setCookie(string $name, string $value = null, int $expire = null, bool $secure = null)
        {
                self::$_COOKIE[$name] = $value;