mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
chore: Add an autoload.php file for tests relying on core class
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
4ee54928a6
commit
f5b7c7498e
2 changed files with 17 additions and 1 deletions
16
tests/autoload.php
Normal file
16
tests/autoload.php
Normal file
|
|
@ -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);
|
||||
|
|
@ -12,8 +12,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
|
||||
|
|
|
|||
Loading…
Reference in a new issue