From 913fad55d8c2e421bf3c55ed3cb2224cde054cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 20 May 2025 10:13:48 +0200 Subject: [PATCH 1/2] chore(tests): Cleanup bootstrap.php to be forward-compatible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/bootstrap.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index abec739a..e97c8196 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,18 +1,26 @@ addValidRoot(OC::$SERVERROOT . '/tests'); - -// Fix for "Autoload path not allowed: .../privacy/tests/testcase.php" -\OC_App::loadApp('privacy'); +Server::get(IAppManager::class)->loadApp('privacy'); -if (!class_exists('\PHPUnit\Framework\TestCase')) { +if (!class_exists(TestCase::class)) { require_once('PHPUnit/Autoload.php'); } From f7f393d890f998f1c908a8ac0ef805584bcd762b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 20 May 2025 10:14:03 +0200 Subject: [PATCH 2/2] chore(tests): Do not clear hooks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/bootstrap.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index e97c8196..30e6a47b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -23,5 +23,3 @@ if (!class_exists(TestCase::class)) { require_once('PHPUnit/Autoload.php'); } - -OC_Hook::clear();