src/Codeception/Module/WPFilesystem.php
protected function ensureWpRootFolder()
    {
        $wpRoot = $this->config['wpRootFolder'];

        if (!is_dir($wpRoot)) {
            $wpRoot = codecept_root_dir(Utils::unleadslashit($wpRoot));
        }

        $message = "[{$wpRoot}] is not a valid WordPress root folder.\n\nThe WordPress root folder is the one that "
                   . "contains the 'wp-load.php' file.";

        if (!(is_dir($wpRoot) && is_readable($wpRoot) && is_writable($wpRoot))) {
            throw new ModuleConfigException(__CLASS__, $message);
        }

        if (!file_exists($wpRoot . '/wp-load.php')) {
            throw new ModuleConfigException(__CLASS__, $message);
        }

        $this->config['wpRootFolder'] = Utils::untrailslashit($wpRoot) . DIRECTORY_SEPARATOR;
    }
protected function ensureWpRootFolder()
    {
        $wpRoot = $this->config['wpRootFolder'];

        if (!is_dir($wpRoot)) {
            $wpRoot = codecept_root_dir(Utils::unleadslashit($wpRoot));
        }

        $message = "[{$wpRoot}] is not a valid WordPress root folder.\n\nThe WordPress root folder is the one that "
                   . "contains the 'wp-load.php' file.";

        if (!(is_dir($wpRoot) && is_readable($wpRoot) && is_writable($wpRoot))) {
            throw new ModuleConfigException(__CLASS__, $message);
        }

        if (!file_exists($wpRoot . '/wp-load.php')) {
            throw new ModuleConfigException(__CLASS__, $message);
        }

        $this->config['wpRootFolder'] = Utils::untrailslashit($wpRoot) . DIRECTORY_SEPARATOR;
    }
protected function ensureWpRootFolder ( ) { $ wpRoot = $ this -> config [ 'wpRootFolder' ] ; if ( ! is_dir ( $ wpRoot ) ) { $ wpRoot = codecept_root_dir ( Utils :: unleadslashit ( $ wpRoot ) ) ; } $ message = "[{$wpRoot}] is not a valid WordPress root folder.\n\nThe WordPress root folder is the one that " . "contains the 'wp-load.php' file." ; if ( ! ( is_dir ( $ wpRoot ) && is_readable ( $ wpRoot ) && is_writable ( $ wpRoot ) ) ) { throw new ModuleConfigException ( __CLASS__ , $ message ) ; } if ( ! file_exists ( $ wpRoot . '/wp-load.php' ) ) { throw new ModuleConfigException ( __CLASS__ , $ message ) ; } $ this -> config [ 'wpRootFolder' ] = Utils :: untrailslashit ( $ wpRoot ) . DIRECTORY_SEPARATOR ; }
Checks the WordPress root folder exists and is a WordPress root folder.

@throws \Codeception\Exception\ModuleConfigException if the WordPress root folder does not exist
or is not a valid WordPress root folder.
Checks the WordPress root folder exists and is a WordPress root folder .