]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Util/HTTPInputDataTest.php
Merge remote-tracking branch 'upstream/2021.12-rc' into api-fixes
[friendica.git] / tests / src / Util / HTTPInputDataTest.php
index 5e8fd228fd0b8fddd6c3ad88d923969f6b96a1f1..0d7c3938b50f94e5f13a0c51661f7c86e44b207e 100644 (file)
@@ -139,14 +139,15 @@ class HTTPInputDataTest extends MockedTest
         */
        public function testHttpInput(string $contentType, string $input, array $expected)
        {
-               HTTPInputDataDouble::setPhpInputContentType($contentType);
-               HTTPInputDataDouble::setPhpInputContent($input);
+               $httpInput = new HTTPInputDataDouble(['CONTENT_TYPE' => $contentType]);
+               $httpInput->setPhpInputContent($input);
+
                $stream = fopen('php://memory', 'r+');
                fwrite($stream, $input);
                rewind($stream);
 
-               HTTPInputDataDouble::setPhpInputStream($stream);
-               $output = HTTPInputDataDouble::process();
+               $httpInput->setPhpInputStream($stream);
+               $output = $httpInput->process();
                $this->assertEqualsCanonicalizing($expected, $output);
        }
 }