Make Moodle linter happy. Mainly tests.

This commit is contained in:
Srdjan
2023-07-04 12:17:41 +10:00
parent 143862e25a
commit 4aa5976ea8
27 changed files with 105 additions and 80 deletions

View File

@@ -29,13 +29,16 @@
* @var stdClass $CFG
*/
define('MOODLE_INTERNAL', true);
defined('MOODLE_INTERNAL') || die(); // Make sniffer happy.
//
// We need the CFG->dataroot, if not set yet this script is called too early in config.php file.
if (!isset($CFG->dataroot)) {
return;
}
// 1) Make sure we replace the configurations for behat as we have not ran 'lib/setup.php' yet.
if (!empty($CFG->behat_wwwroot) or !empty($CFG->behat_dataroot) or !empty($CFG->behat_prefix)) {
if (!empty($CFG->behat_wwwroot) || !empty($CFG->behat_dataroot) || !empty($CFG->behat_prefix)) {
require_once(__DIR__.'/../../lib/behat/lib.php');
behat_update_vars_for_process();
if (behat_is_test_site()) {