From d517fed12dc0b9acee3397f24b6c1b16b7382851 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 29 Aug 2021 13:49:10 +0200 Subject: [PATCH] Add test for https://github.com/friendica/friendica/issues/10473#issuecomment-907749093 --- tests/src/Network/HTTPClientTest.php | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/src/Network/HTTPClientTest.php 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); + } +}