27 lines
819 B
PHP
27 lines
819 B
PHP
<?php
|
|
|
|
/*
|
|
* Initial module test bootstrap. Loads default HumHub test bootstrap.
|
|
*/
|
|
|
|
$testRoot = dirname(__DIR__);
|
|
|
|
\Codeception\Configuration::append(['test_root' => $testRoot]);
|
|
codecept_debug('Module root: ' . $testRoot);
|
|
|
|
$humhubPath = getenv('HUMHUB_PATH');
|
|
if ($humhubPath === false) {
|
|
$moduleConfig = require $testRoot . '/config/test.php';
|
|
if (isset($moduleConfig['humhub_root'])) {
|
|
$humhubPath = $moduleConfig['humhub_root'];
|
|
} else {
|
|
$humhubPath = dirname(__DIR__, 5);
|
|
}
|
|
}
|
|
|
|
\Codeception\Configuration::append(['humhub_root' => $humhubPath]);
|
|
codecept_debug('HumHub Root: ' . $humhubPath);
|
|
|
|
$globalConfig = require $humhubPath . '/protected/humhub/tests/codeception/_loadConfig.php';
|
|
require $globalConfig['humhub_root'] . '/protected/humhub/tests/codeception/_bootstrap.php';
|