We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d96395f + 6826aac commit 1d2f999Copy full SHA for 1d2f999
1 file changed
tests/unit/bootstrap.php
@@ -1,17 +1,25 @@
1
<?php
2
3
+declare(strict_types=1);
4
+
5
/**
6
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
7
* SPDX-License-Identifier: AGPL-3.0-or-later
8
*/
9
10
+use OCP\App\IAppManager;
11
+use OCP\Server;
12
+use PHPUnit\Framework\TestCase;
13
14
if (!defined('PHPUNIT_RUN')) {
15
define('PHPUNIT_RUN', 1);
16
}
17
18
require_once __DIR__ . '/../../../../lib/base.php';
-\OC::$loader->addValidRoot(\OC::$SERVERROOT . '/tests');
-\OC_App::loadApp('user_saml');
-if (!class_exists(\PHPUnit\Framework\TestCase::class)) {
19
+require_once __DIR__ . '/../../../../tests/autoload.php';
20
21
+Server::get(IAppManager::class)->loadApp('user_saml');
22
23
+if (!class_exists(TestCase::class)) {
24
require_once('PHPUnit/Autoload.php');
25
-OC_Hook::clear();
0 commit comments