2012-10-03 15:06:01 -04:00
|
|
|
<?php
|
2024-05-10 09:09:14 -04:00
|
|
|
/**
|
|
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
*/
|
2013-01-31 16:05:06 -05:00
|
|
|
define('PHPUNIT_RUN', 1);
|
|
|
|
|
|
2014-03-13 08:33:09 -04:00
|
|
|
$configDir = getenv('CONFIG_DIR');
|
|
|
|
|
if ($configDir) {
|
|
|
|
|
define('PHPUNIT_CONFIG_DIR', $configDir);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../lib/base.php';
|
2025-05-19 05:21:55 -04:00
|
|
|
require_once __DIR__ . '/autoload.php';
|
2012-10-03 15:06:01 -04:00
|
|
|
|
2016-05-19 09:49:27 -04:00
|
|
|
\OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true);
|
2015-08-18 09:35:02 -04:00
|
|
|
|
2025-05-23 14:14:37 -04:00
|
|
|
// load all apps
|
|
|
|
|
foreach (new \DirectoryIterator(__DIR__ . '/../apps/') as $file) {
|
|
|
|
|
if ($file->isDot()) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
\OC_App::loadApp($file->getFilename());
|
|
|
|
|
}
|
2014-07-17 05:46:57 -04:00
|
|
|
|
2012-10-12 09:44:48 -04:00
|
|
|
OC_Hook::clear();
|
2017-04-07 06:06:50 -04:00
|
|
|
|
2023-09-28 07:20:49 -04:00
|
|
|
set_include_path(
|
|
|
|
|
get_include_path() . PATH_SEPARATOR
|
|
|
|
|
. '/usr/share/php' . PATH_SEPARATOR
|
|
|
|
|
. __DIR__ . '/..'
|
|
|
|
|
);
|