Skip to content

Commit eba4562

Browse files
authored
Merge pull request #1418 from nextcloud/fix/cleanup-tests-bootstrap
chore(tests): Cleanup bootstrap.php to be forward-compatible
2 parents a211ea7 + 758b577 commit eba4562

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/bootstrap.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/**
46
* Nextcloud - maps
57
*
@@ -10,11 +12,11 @@
1012
* @copyright Julien Veyssier 2019
1113
*/
1214

15+
use OCP\App\IAppManager;
16+
use OCP\Server;
17+
1318
require_once __DIR__ . '/../../../tests/bootstrap.php';
1419
require_once __DIR__ . '/../../../lib/base.php';
1520
require_once __DIR__ . '/../vendor/autoload.php';
1621

17-
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
18-
\OC_App::loadApp('maps');
19-
20-
OC_Hook::clear();
22+
Server::get(IAppManager::class)->loadApp('maps');

0 commit comments

Comments
 (0)