-
Notifications
You must be signed in to change notification settings - Fork 19
/
bootstrap.php
26 lines (22 loc) · 1.11 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
define('PHPUNIT_RUN', 1);
use Composer\Autoload\ClassLoader;
include_once __DIR__.'/vendor/autoload.php';
if (file_exists(__DIR__ . '/server')) {
$serverPath = __DIR__ . '/server';
} else {
$serverPath = __DIR__ . '/../..';
}
include_once $serverPath.'/3rdparty/autoload.php';
require_once $serverPath. '/lib/base.php';
$classLoader = new ClassLoader();
$classLoader->addPsr4("OCA\\OpenProject\\Service\\", __DIR__ . '/lib/Service', true);
$classLoader->addPsr4("OCA\\OpenProject\\Settings\\", __DIR__ . '/lib/Settings', true);
$classLoader->addPsr4("OCP\\", $serverPath . '/lib/public', true);
$classLoader->addPsr4("OC\\", $serverPath . '/lib/private', true);
$classLoader->addPsr4("OCA\\Files\\Event\\", $serverPath . '/apps/files/lib/Event', true);
$classLoader->addPsr4("OCA\\OpenProject\\AppInfo\\", __DIR__ . '/lib/AppInfo', true);
$classLoader->addPsr4("OCA\\OpenProject\\Controller\\", __DIR__ . '/lib/Controller', true);
$classLoader->addPsr4("OCA\\OpenProject\\Exception\\", __DIR__ . '/lib/Exception', true);
$classLoader->register();
set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/php');