3 namespace Friendica\Test\src\Network;
6 use Friendica\Test\DiceHttpMockHandlerTrait;
7 use Friendica\Test\MockedTest;
8 use GuzzleHttp\Handler\MockHandler;
9 use GuzzleHttp\Psr7\Response;
11 class HTTPClientTest extends MockedTest
13 use DiceHttpMockHandlerTrait;
15 protected function setUp(): void
19 $this->setupHttpMockHandler();
23 * Test for issue https://github.com/friendica/friendica/issues/10473#issuecomment-907749093
25 public function testInvalidURI()
27 $this->httpRequestHandler->setHandler(new MockHandler([
28 new Response(301, ['Location' => 'https:///']),
31 self::assertFalse(DI::httpClient()->get('https://friendica.local')->isSuccess());