mirror of https://github.com/sualko/cloud_bbb
chore: enable app for unit tests
parent
7de8330d60
commit
6ff3ab130b
|
@ -1,10 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
if (!defined('PHPUNIT_RUN')) {
|
||||||
|
define('PHPUNIT_RUN', 1);
|
||||||
|
}
|
||||||
|
|
||||||
if (!($ncRoot = getenv('NEXTCLOUD_ROOT'))) {
|
if (!($ncRoot = getenv('NEXTCLOUD_ROOT'))) {
|
||||||
$ncRoot = __DIR__ . '/../../..';
|
$ncRoot = __DIR__ . '/../../..';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Using ".realpath($ncRoot)." as Nextcloud root.\n\n";
|
|
||||||
|
|
||||||
require_once $ncRoot . '/lib/base.php';
|
require_once $ncRoot . '/lib/base.php';
|
||||||
require_once __DIR__ . '/../vendor/autoload.php';
|
require_once __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
|
\OC_App::loadApp('bbb');
|
||||||
|
|
||||||
|
if (!class_exists('\PHPUnit\Framework\TestCase')) {
|
||||||
|
require_once('PHPUnit/Autoload.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Using ".realpath($ncRoot)." as Nextcloud root.\n\n";
|
||||||
|
|
Loading…
Reference in New Issue