Skip to content

Commit ca8403b

Browse files
icewind1991salmart-dev
authored andcommitted
chore(tests): Cleanup bootstrap.php to be forward-compatible
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 1e812e9 commit ca8403b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/bootstrap.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
66
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
77
* SPDX-License-Identifier: AGPL-3.0-or-later
88
*/
9-
define('PHPUNIT_RUN', 1);
9+
10+
use OCP\App\IAppManager;
11+
use OCP\Server;
12+
13+
if (!defined('PHPUNIT_RUN')) {
14+
define('PHPUNIT_RUN', 1);
15+
}
1016

1117
require_once __DIR__ . '/../../../lib/base.php';
1218
require_once __DIR__ . '/../vendor/autoload.php';
1319

1420
require_once __DIR__ . '/../../../tests/autoload.php';
1521

16-
\OC_App::loadApp('circles');
22+
Server::get(IAppManager::class)->loadApp('circles');
1723

1824
OC_Hook::clear();

0 commit comments

Comments
 (0)