diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2023-10-27 22:10:28 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2023-10-27 22:10:28 +0300 |
| commit | 925256c81f3be3678ced527fe32f5ae59418ad00 (patch) | |
| tree | 51f25e831ab0fb758c29f1b638592a553653edd0 /tests/SelfUrlPathTest.php | |
| parent | 5a7c5b8249e880952e011dd4e91726c0409c92de (diff) | |
unify test class naming
Diffstat (limited to 'tests/SelfUrlPathTest.php')
| -rw-r--r-- | tests/SelfUrlPathTest.php | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/tests/SelfUrlPathTest.php b/tests/SelfUrlPathTest.php deleted file mode 100644 index b8892f84b..000000000 --- a/tests/SelfUrlPathTest.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -use PHPUnit\Framework\TestCase; - -final class SelfUrlPathTest extends TestCase { - public function test_a(): void { - $_SERVER = []; - - $_SERVER["HTTP_X_FORWARDED_PROTO"] = "http"; - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/tt-rss/api/index.php"; - - $this->assertEquals( - 'http://example.com/tt-rss', - Config::get_self_url(true) - ); - - } - - public function test_b(): void { - $_SERVER = []; - - $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/api/"; - - $this->assertEquals( - 'https://example.com', - Config::get_self_url(true) - ); - } - - public function test_c(): void { - $_SERVER = []; - - $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/api/index.php"; - - $this->assertEquals( - 'https://example.com', - Config::get_self_url(true) - ); - } - - public function test_d(): void { - $_SERVER = []; - - $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/api//"; - - $this->assertEquals( - 'https://example.com', - Config::get_self_url(true) - ); - } - - public function test_e(): void { - $_SERVER = []; - - $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/"; - - $this->assertEquals( - 'https://example.com', - Config::get_self_url(true) - ); - } - - public function test_f(): void { - $_SERVER = []; - - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/tt-rss/index.php"; - - $this->assertEquals( - 'http://example.com/tt-rss', - Config::get_self_url(true) - ); - } - - public function test_g(): void { - $_SERVER = []; - - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/tt-rss/"; - - $this->assertEquals( - 'http://example.com/tt-rss', - Config::get_self_url(true) - ); - } - - public function test_h(): void { - $_SERVER = []; - - $_SERVER["HTTP_HOST"] = "example.com"; - $_SERVER["REQUEST_URI"] = "/tt-rss"; - - $this->assertEquals( - 'http://example.com/tt-rss', - Config::get_self_url(true) - ); - } -} |