From: Philipp Date: Sun, 29 Aug 2021 11:49:10 +0000 (+0200) Subject: Add test for https://github.com/friendica/friendica/issues/10473#issuecomment-907749093 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d517fed12dc0b9acee3397f24b6c1b16b7382851;p=friendica.git Add test for https://github.com/friendica/friendica/issues/10473#issuecomment-907749093 --- diff --git a/tests/src/Network/HTTPClientTest.php b/tests/src/Network/HTTPClientTest.php new file mode 100644 index 0000000000..89f2510f30 --- /dev/null +++ b/tests/src/Network/HTTPClientTest.php @@ -0,0 +1,36 @@ +setupHttpMockHandler(); + } + + /** + * Test for issue https://github.com/friendica/friendica/issues/10473#issuecomment-907749093 + */ + public function testInvalidURI() + { + $this->httpRequestHandler->setHandler(new MockHandler([ + new Response(301, ['Location' => 'https:///']), + ])); + + $httpClient = DI::httpClient(); + $httpClient->get('https:///'); + + self::assertEquals(1,1); + } +}