From b7475c066e0af8a74b73d79ffadbb76539dfb0d7 Mon Sep 17 00:00:00 2001 From: Danny van der Sluijs Date: Mon, 5 Feb 2024 20:47:18 +0100 Subject: [PATCH] test: Add test failure --- tests/Uri/Retrievers/FileGetContentsTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Uri/Retrievers/FileGetContentsTest.php b/tests/Uri/Retrievers/FileGetContentsTest.php index 0514a7d5..d8b4b45a 100644 --- a/tests/Uri/Retrievers/FileGetContentsTest.php +++ b/tests/Uri/Retrievers/FileGetContentsTest.php @@ -59,6 +59,15 @@ public function testContentType() $this->assertTrue($fetchContentType->invoke($res, array('Content-Type: application/json'))); $this->assertFalse($fetchContentType->invoke($res, array('X-Some-Header: whateverValue'))); } + + public function testCanHandleHttp301PermanentRedirect() + { + $res = new FileGetContents(); + + $res->retrieve('http://asyncapi.com/definitions/2.0.0/asyncapi.json'); + + $this->assertSame('application/schema+json', $res->getContentType()); + } } }