/** * @param string $folder = null The absolute path to the WordPress root installation folder. * * @throws ModuleConfigException */ protected function loadConfigFile($folder = null) { $folder = $folder ?: codecept_root_dir(); $frags = $this->config['configFile']; $frags = is_array($frags) ?: [$frags]; foreach ($frags as $frag) { if (!empty($frag)) { $configFile = Utils::findHereOrInParent($frag, $folder); if (!file_exists($configFile)) { throw new ModuleConfigException(__CLASS__, "\nConfig file `{$frag}` could not be found in WordPress root folder or above."); } require_once $configFile; } } }