aboutsummaryrefslogtreecommitdiff
path: root/tests/UrlTest.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2025-01-03 05:40:30 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-03 05:40:30 +0100
commitbe51ba17df892fde0c371c181425dd636f0f4d37 (patch)
treeca53f2f97628649d0d9abe69a46ea650e154ee3b /tests/UrlTest.php
parentc44a76ff17833709d9bb336778fdcfd159f620b4 (diff)
downloadrss-bridge-be51ba17df892fde0c371c181425dd636f0f4d37.tar.gz
rss-bridge-be51ba17df892fde0c371c181425dd636f0f4d37.tar.zst
rss-bridge-be51ba17df892fde0c371c181425dd636f0f4d37.zip
fix(url): disallowed wonky path (#4386)
Diffstat (limited to '')
-rw-r--r--tests/UrlTest.php6
1 files changed, 6 insertions, 0 deletions
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());