Codeception\Module\WPLoader::loadConfigFile PHP Method

loadConfigFile() protected method

protected loadConfigFile ( string $folder = null )
$folder string = null The absolute path to the WordPress root installation folder.
    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;
            }
        }
    }