diff options
Diffstat (limited to 'tests/bootstrap.php')
| -rw-r--r-- | tests/bootstrap.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 8cae8e1..a484982 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -5,3 +5,11 @@ putenv("IS_TESTING=true"); require_once "common.php"; + + // Stub validate_session() for unit tests (no DB needed). + // Integration tests load sessions.php which defines the real function. + if (!function_exists('validate_session')) { + function validate_session() : bool { + return !empty($_SESSION["owner"]) && !empty($_SESSION["pass_hash"]); + } + } |
