]> git.mxchange.org Git - friendica.git/blobdiff - tests/Util/HTTPInputDataDouble.php
Remove relocation form from Admin Site settings
[friendica.git] / tests / Util / HTTPInputDataDouble.php
index 391b9c82bb2d4f45842523d97c12fb21342e5489..5a3a4e4b468cfecdc3ae9339218f2183bcbaac28 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -30,20 +30,18 @@ use Friendica\Util\HTTPInputData;
 class HTTPInputDataDouble extends HTTPInputData
 {
        /** @var false|resource */
-       protected static $injectedStream = false;
+       protected $injectedStream = false;
        /** @var false|string */
-       protected static $injectedContent = false;
-       /** @var false|string */
-       protected static $injectedContentType = false;
+       protected $injectedContent = false;
 
        /**
         * injects the PHP input stream for a test
         *
         * @param false|resource $stream
         */
-       public static function setPhpInputStream($stream)
+       public function setPhpInputStream($stream)
        {
-               self::$injectedStream = $stream;
+               $this->injectedStream = $stream;
        }
 
        /**
@@ -51,9 +49,9 @@ class HTTPInputDataDouble extends HTTPInputData
         *
         * @param false|string $content
         */
-       public static function setPhpInputContent($content)
+       public function setPhpInputContent($content)
        {
-               self::$injectedContent = $content;
+               $this->injectedContent = $content;
        }
 
        /**
@@ -61,30 +59,24 @@ class HTTPInputDataDouble extends HTTPInputData
         *
         * @param false|string $contentType
         */
-       public static function setPhpInputContentType($contentType)
-       {
-               self::$injectedContentType = $contentType;
-       }
-
-       /** {@inheritDoc} */
-       protected static function getPhpInputStream()
+       public function setPhpInputContentType($contentType)
        {
-               return static::$injectedStream;
+               $this->injectedContentType = $contentType;
        }
 
        /** {@inheritDoc} */
-       protected static function getPhpInputContent()
+       protected function getPhpInputStream()
        {
-               return static::$injectedContent;
+               return $this->injectedStream;
        }
 
        /** {@inheritDoc} */
-       protected static function getContentType()
+       protected function getPhpInputContent()
        {
-               return static::$injectedContentType;
+               return $this->injectedContent;
        }
 
-       protected static function fetchFileData($stream, string $boundary, array $headers, string $filename)
+       protected function fetchFileData($stream, string $boundary, array $headers, string $filename)
        {
                $data = parent::fetchFileData($stream, $boundary, $headers, $filename);
                if (!empty($data['tmp_name'])) {