summaryrefslogtreecommitdiff
path: root/tests/ConfigTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ConfigTest.php')
-rw-r--r--tests/ConfigTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ConfigTest.php b/tests/ConfigTest.php
index 30f3a212a..f65f0060d 100644
--- a/tests/ConfigTest.php
+++ b/tests/ConfigTest.php
@@ -104,6 +104,18 @@ final class SelfUrlPathTest extends TestCase {
);
}
+ public function test_self_url_i(): void {
+ $_SERVER = [];
+
+ $_SERVER["HTTP_HOST"] = "example.com";
+ $_SERVER["REQUEST_URI"] = "/tt-rss////plugins.local/example///api/long path/test.php";
+
+ $this->assertEquals(
+ 'http://example.com/tt-rss',
+ Config::get_self_url(true)
+ );
+ }
+
public function test_get_self_dir(): void {
$this->assertEquals(
dirname(__DIR__), # we're in (app)/tests/