Skip to content

Commit d864c50

Browse files
committed
fix bootstrap.php for phpunit
Signed-off-by: Lukas Schaefer <[email protected]>
1 parent 66d93f4 commit d864c50

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/bootstrap.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,17 @@
55
* SPDX-License-Identifier: AGPL-3.0-or-later
66
*/
77

8+
declare(strict_types=1);
9+
10+
811
use OCP\App\IAppManager;
912
use OCP\Server;
1013

11-
require_once __DIR__ . '/../../../tests/bootstrap.php';
14+
if (!defined('PHPUNIT_RUN')) {
15+
define('PHPUNIT_RUN', 1);
16+
}
17+
18+
require_once __DIR__ . '/../../../lib/base.php';
19+
require_once __DIR__ . '/../../../tests/autoload.php';
1220

13-
Server::get(IAppManager::class)->loadApps();
14-
OC_Hook::clear();
21+
Server::get(IAppManager::class)->loadApp('integration_openai');

0 commit comments

Comments
 (0)