From 393b2807cdbf0044e8cd9c1568ddfa5aa58be9a9 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 20 May 2025 10:02:58 +0200 Subject: [PATCH] chore(tests): Cleanup bootstrap.php to be forward-compatible Signed-off-by: Joas Schilling --- tests/php/bootstrap.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/php/bootstrap.php b/tests/php/bootstrap.php index 8698209fe51..982b893d540 100644 --- a/tests/php/bootstrap.php +++ b/tests/php/bootstrap.php @@ -1,16 +1,20 @@ addValidRoot(\OC::$SERVERROOT . '/tests'); -\OC_App::loadApp('spreed'); -if (!class_exists(\PHPUnit\Framework\TestCase::class)) { - require_once('PHPUnit/Autoload.php'); -} -\OC_Hook::clear(); +require_once __DIR__ . '/../../../../tests/autoload.php'; + +Server::get(IAppManager::class)->loadApp('spreed');