File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types=1 );
4+
5+ /**
6+ * SPDX-FileCopyrightText: 2025 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+
314if (!defined ('PHPUNIT_RUN ' )) {
415 define ('PHPUNIT_RUN ' , 1 );
516}
617
718require_once __DIR__ . '/../../../lib/base.php ' ;
19+ require_once __DIR__ . '/../../../tests/autoload.php ' ;
820
9- // Fix for "Autoload path not allowed: .../tests/lib/testcase.php"
10- \OC ::$ loader ->addValidRoot (OC ::$ SERVERROOT . '/tests ' );
21+ Server::get (IAppManager::class)->loadApp ('privacy ' );
1122
12- // Fix for "Autoload path not allowed: .../privacy/tests/testcase.php"
13- \OC_App::loadApp ('privacy ' );
14-
15- if (!class_exists ('\PHPUnit\Framework\TestCase ' )) {
23+ if (!class_exists (TestCase::class)) {
1624 require_once ('PHPUnit/Autoload.php ' );
1725}
18-
19- OC_Hook::clear ();
You can’t perform that action at this time.
0 commit comments