mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-18 05:20:43 +01:00
fix(tests): use autoload.php for unit tests
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
This commit is contained in:
parent
e1bed90180
commit
42e1445d59
1 changed files with 10 additions and 3 deletions
|
|
@ -1,17 +1,24 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-FileCopyrightText: 2014-2015 ownCloud, Inc.
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\Server;
|
||||
|
||||
if (!defined('PHPUNIT_RUN')) {
|
||||
define('PHPUNIT_RUN', 1);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/../../../lib/base.php';
|
||||
require_once __DIR__ . '/../../../tests/autoload.php';
|
||||
|
||||
Server::get(IAppManager::class)->loadApp('richdocuments');
|
||||
|
||||
if (!class_exists(\PHPUnit\Framework\TestCase::class)) {
|
||||
require_once('PHPUnit/Autoload.php');
|
||||
}
|
||||
\OC_App::loadApp('richdocuments');
|
||||
OC_Hook::clear();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue