Skip to content

Commit f07dc35

Browse files
committed
chore(tests): cleanup bootstrap.php to be forward-compatible
Signed-off-by: Richard Steinmetz <[email protected]>
1 parent a3494ac commit f07dc35

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/php/unit/bootstrap.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/**
46
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
57
* SPDX-License-Identifier: AGPL-3.0-or-later
68
*/
9+
710
if (!defined('PHPUNIT_RUN')) {
811
define('PHPUNIT_RUN', 1);
912
}
1013

11-
require_once __DIR__ . '/../../../../../lib/base.php';
14+
use OCP\App\IAppManager;
15+
use OCP\Server;
1216

13-
\OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
17+
require_once __DIR__ . '/../../../../../lib/base.php';
18+
require_once __DIR__ . '/../../../../../tests/autoload.php';
19+
require_once __DIR__ . '/../../../vendor/autoload.php';
1420

15-
\OC_App::loadApp('calendar');
21+
Server::get(IAppManager::class)->loadApp('calendar');
1622

1723
OC_Hook::clear();

0 commit comments

Comments
 (0)