src/Codeception/Module/WPCLI.php
protected function initWpCliPaths()
    {
        try {
            $ref = new \ReflectionClass(Configurator::class);
        } catch (\ReflectionException $e) {
            throw new ModuleException(__CLASS__, 'could not find the path to embedded WPCLI Configurator class');
        }
        $this->wpCliRoot = dirname($ref->getFileName()) . '/../../';
        $this->bootPath  = $this->wpCliRoot . '/php/boot-fs.php';
    }
protected function initWpCliPaths()
    {
        try {
            $ref = new \ReflectionClass(Configurator::class);
        } catch (\ReflectionException $e) {
            throw new ModuleException(__CLASS__, 'could not find the path to embedded WPCLI Configurator class');
        }
        $this->wpCliRoot = dirname($ref->getFileName()) . '/../../';
        $this->bootPath  = $this->wpCliRoot . '/php/boot-fs.php';
    }
protected function initWpCliPaths ( ) { try { $ ref = new \ ReflectionClass ( Configurator :: class ) ; } catch ( \ ReflectionException $ e ) { throw new ModuleException ( __CLASS__ , 'could not find the path to embedded WPCLI Configurator class' ) ; } $ this -> wpCliRoot = dirname ( $ ref -> getFileName ( ) ) . '/../../' ; $ this -> bootPath = $ this -> wpCliRoot . '/php/boot-fs.php' ; }
Initializes the wp-cli root location.

The way the location works is an ugly hack that assumes the folder structure
of the code to climb the tree and find the root folder.

@throws \Codeception\Exception\ModuleException If the embedded WPCLI Configurator class file
could not be found.
Initializes the wp - cli root location .