about summary refs log tree commit diff stats
path: root/tests_integration/DbTestCase.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-05-27 20:45:59 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-05-27 20:45:59 +0300
commit2b28a847f97395d756d16400ce3fb29b8c8bb75e (patch)
treecf3677ab97f9f9a984a1ee7fd5e5a4fd9853df96 /tests_integration/DbTestCase.php
parentac7b51679ca4df5fbb70d0ac796935de191b5e0d (diff)
downloadthe-epube-2b28a847f97395d756d16400ce3fb29b8c8bb75e.tar.gz
the-epube-2b28a847f97395d756d16400ce3fb29b8c8bb75e.tar.xz
add tests for logout
Diffstat (limited to 'tests_integration/DbTestCase.php')
-rw-r--r--tests_integration/DbTestCase.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests_integration/DbTestCase.php b/tests_integration/DbTestCase.php
index 5654017..a6ed51d 100644
--- a/tests_integration/DbTestCase.php
+++ b/tests_integration/DbTestCase.php
@@ -4,10 +4,14 @@ use PHPUnit\Framework\TestCase;
 abstract class DbTestCase extends TestCase {
 
 	protected function setUp(): void {
-
+		$_SESSION["owner"] = "test";
 	}
 
 	protected function tearDown(): void {
+		if (session_status() == PHP_SESSION_ACTIVE)
+			session_destroy();
 
+		// reset any possible local config changes
+		Config::get_instance()->reload();
 	}
 }