diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-05-19 11:21:55 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-05-19 15:44:05 +0000 |
commit | 383ed0089db1f4c9dce7928af778a5b31b692088 (patch) | |
tree | d2b61fae8f902e61e7ff77f6dc05fd4b8251c84c | |
parent | ef3b98d1f294b1cb96293ed8a82a6ebdb0aa8226 (diff) | |
download | nextcloud-server-backport/52951/stable30.tar.gz nextcloud-server-backport/52951/stable30.zip |
chore: Add an autoload.php file for tests relying on core classbackport/52951/stable30
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r-- | tests/autoload.php | 16 | ||||
-rw-r--r-- | tests/bootstrap.php | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tests/autoload.php b/tests/autoload.php new file mode 100644 index 00000000000..05fc3852924 --- /dev/null +++ b/tests/autoload.php @@ -0,0 +1,16 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +require_once __DIR__ . '/../lib/base.php'; + +/** + * This is a file that applications can require to be able to autoload the class Test\TestCase from Nextcloud tests + */ + +\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 5ce6bc400bd..f633e50a8cf 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -13,8 +13,8 @@ if ($configDir) { } require_once __DIR__ . '/../lib/base.php'; +require_once __DIR__ . '/autoload.php'; -\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true); \OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true); // load all enabled apps |