summaryrefslogtreecommitdiff
path: root/tests/SelfDirTest.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-27 22:07:28 +0300
committerAndrew Dolgov <[email protected]>2023-10-27 22:07:28 +0300
commit5920ac814c0a72b8c348650b09597ed8793a54c9 (patch)
treea52a8f755ea033a6c96f8a1c1633d81b68ab5c45 /tests/SelfDirTest.php
parent8c9c69921f8552e49291df9e2503709aaa564270 (diff)
replace some dirname horrors with a separate unit-tested method
Diffstat (limited to 'tests/SelfDirTest.php')
-rw-r--r--tests/SelfDirTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/SelfDirTest.php b/tests/SelfDirTest.php
new file mode 100644
index 000000000..5b7396a66
--- /dev/null
+++ b/tests/SelfDirTest.php
@@ -0,0 +1,12 @@
+<?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()
+ );
+ }
+}