diff options
author | Andrew Dolgov <[email protected]> | 2023-10-27 22:10:28 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2023-10-27 22:10:28 +0300 |
commit | 925256c81f3be3678ced527fe32f5ae59418ad00 (patch) | |
tree | 51f25e831ab0fb758c29f1b638592a553653edd0 | |
parent | 5a7c5b8249e880952e011dd4e91726c0409c92de (diff) |
unify test class naming
-rw-r--r-- | tests/ConfigTest.php (renamed from tests/SelfUrlPathTest.php) | 23 | ||||
-rw-r--r-- | tests/SelfDirTest.php | 12 |
2 files changed, 15 insertions, 20 deletions
diff --git a/tests/SelfUrlPathTest.php b/tests/ConfigTest.php index b8892f84b..30f3a212a 100644 --- a/tests/SelfUrlPathTest.php +++ b/tests/ConfigTest.php @@ -2,7 +2,7 @@ use PHPUnit\Framework\TestCase; final class SelfUrlPathTest extends TestCase { - public function test_a(): void { + public function test_self_url_a(): void { $_SERVER = []; $_SERVER["HTTP_X_FORWARDED_PROTO"] = "http"; @@ -16,7 +16,7 @@ final class SelfUrlPathTest extends TestCase { } - public function test_b(): void { + public function test_self_url_b(): void { $_SERVER = []; $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; @@ -29,7 +29,7 @@ final class SelfUrlPathTest extends TestCase { ); } - public function test_c(): void { + public function test_self_url_c(): void { $_SERVER = []; $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; @@ -42,7 +42,7 @@ final class SelfUrlPathTest extends TestCase { ); } - public function test_d(): void { + public function test_self_url_d(): void { $_SERVER = []; $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; @@ -55,7 +55,7 @@ final class SelfUrlPathTest extends TestCase { ); } - public function test_e(): void { + public function test_self_url_e(): void { $_SERVER = []; $_SERVER["HTTP_X_FORWARDED_PROTO"] = "https"; @@ -68,7 +68,7 @@ final class SelfUrlPathTest extends TestCase { ); } - public function test_f(): void { + public function test_self_url_f(): void { $_SERVER = []; $_SERVER["HTTP_HOST"] = "example.com"; @@ -80,7 +80,7 @@ final class SelfUrlPathTest extends TestCase { ); } - public function test_g(): void { + public function test_self_url_g(): void { $_SERVER = []; $_SERVER["HTTP_HOST"] = "example.com"; @@ -92,7 +92,7 @@ final class SelfUrlPathTest extends TestCase { ); } - public function test_h(): void { + public function test_self_url_h(): void { $_SERVER = []; $_SERVER["HTTP_HOST"] = "example.com"; @@ -103,4 +103,11 @@ final class SelfUrlPathTest extends TestCase { Config::get_self_url(true) ); } + + public function test_get_self_dir(): void { + $this->assertEquals( + dirname(__DIR__), # we're in (app)/tests/ + Config::get_self_dir() + ); + } } diff --git a/tests/SelfDirTest.php b/tests/SelfDirTest.php deleted file mode 100644 index 5b7396a66..000000000 --- a/tests/SelfDirTest.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -use PHPUnit\Framework\TestCase; - -final class ConfigTest extends TestCase { - public function test_get_self_dir(): void { - $this->assertEquals( - dirname(__DIR__), # we're in (app)/tests/ - Config::get_self_dir() - ); - } -} |