Skip to content

Commit 5f1995d

Browse files
authored
Merge pull request #1122 from nextcloud/fix/cleanup-tests-bootstrap
chore(tests): Cleanup bootstrap.php to be forward-compatible
2 parents 9e6c47b + c6c4650 commit 5f1995d

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

.github/workflows/integration.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ jobs:
2424
databases: ['sqlite', 'mysql', 'pgsql']
2525
server-versions: ['master']
2626
include:
27-
- php-versions: 8.1
28-
databases: mysql
29-
server-versions: stable28
3027
- php-versions: 8.1
3128
databases: mysql
3229
server-versions: stable29

.github/workflows/phpunit.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
matrix:
2424
php-versions: ['8.0', '8.1', '8.2']
2525
databases: ['mysql']
26-
server-versions: ['stable28', 'stable29', 'stable30', 'stable31', 'master']
26+
server-versions: ['stable29', 'stable30', 'stable31', 'master']
2727
exclude:
2828
- php-versions: 8.0
2929
server-versions: master
@@ -32,9 +32,6 @@ jobs:
3232
- php-versions: 8.0
3333
server-versions: stable30
3434
include:
35-
- php-versions: 8.3
36-
databases: mysql
37-
server-versions: stable28
3835
- php-versions: 8.3
3936
databases: mysql
4037
server-versions: stable29

tests/bootstrap.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
/**
46
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
57
* SPDX-License-Identifier: AGPL-3.0-or-later
68
*/
79

10+
use OCP\App\IAppManager;
11+
use OCP\Server;
12+
813
if (!defined('PHPUNIT_RUN')) {
914
define('PHPUNIT_RUN', 1);
1015
}
16+
1117
require_once __DIR__ . '/../../../lib/base.php';
18+
require_once __DIR__ . '/../../../tests/autoload.php';
1219
require_once __DIR__ . '/../vendor/autoload.php';
1320

14-
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
15-
\OC_App::loadApp('user_oidc');
16-
17-
OC_Hook::clear();
21+
Server::get(IAppManager::class)->loadApp('user_oidc');

0 commit comments

Comments
 (0)