From be51ba17df892fde0c371c181425dd636f0f4d37 Mon Sep 17 00:00:00 2001 From: Dag Date: Fri, 3 Jan 2025 05:40:30 +0100 Subject: fix(url): disallowed wonky path (#4386) --- tests/UrlTest.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/UrlTest.php') diff --git a/tests/UrlTest.php b/tests/UrlTest.php index d45f319b..72b9ac4c 100644 --- a/tests/UrlTest.php +++ b/tests/UrlTest.php @@ -36,6 +36,12 @@ class UrlTest extends TestCase } } + public function testIllegalPath() + { + $this->expectException(\UrlException::class); + Url::fromString('https://example.com//foo'); + } + public function testMutation() { $this->assertSame('http://example.com/foo', (Url::fromString('http://example.com/'))->withPath('/foo')->__toString()); -- cgit v1.2.3