src/Codeception/Module/WordPress.php
public function getWpRootFolder()
    {
        if (empty($this->wpRootFolder)) {
            // allow me not to bother with trailing slashes
            $wpRootFolder = Utils::untrailslashit($this->config['wpRootFolder']) . DIRECTORY_SEPARATOR;

            // maybe the user is using the `~` symbol for home?
            $this->wpRootFolder = Utils::homeify($wpRootFolder);

            // remove `\ ` spaces in folder paths
            $this->wpRootFolder = str_replace('\ ', ' ', $this->wpRootFolder);
        }

        return $this->wpRootFolder;
    }
public function getWpRootFolder()
    {
        if (empty($this->wpRootFolder)) {
            // allow me not to bother with trailing slashes
            $wpRootFolder = Utils::untrailslashit($this->config['wpRootFolder']) . DIRECTORY_SEPARATOR;

            // maybe the user is using the `~` symbol for home?
            $this->wpRootFolder = Utils::homeify($wpRootFolder);

            // remove `\ ` spaces in folder paths
            $this->wpRootFolder = str_replace('\ ', ' ', $this->wpRootFolder);
        }

        return $this->wpRootFolder;
    }
public function getWpRootFolder ( ) { if ( empty ( $ this -> wpRootFolder ) ) { // allow me not to bother with trailing slashes $ wpRootFolder = Utils :: untrailslashit ( $ this -> config [ 'wpRootFolder' ] ) . DIRECTORY_SEPARATOR ; // maybe the user is using the `~` symbol for home? $ this -> wpRootFolder = Utils :: homeify ( $ wpRootFolder ) ; // remove `\ ` spaces in folder paths $ this -> wpRootFolder = str_replace ( '\ ' , ' ' , $ this -> wpRootFolder ) ; } return $ this -> wpRootFolder ; }
Returns the absolute path to the WordPress root folder.

@example
```php
$root = $I->getWpRootFolder();
$this->assertFileExists($root . '/someFile.txt');
```

@return string The absolute path to the WordPress root folder, without a trailing slash.
Returns the absolute path to the WordPress root folder .