think\PhpunitHelper::getProjectRoot PHP Method

getProjectRoot() public method

public getProjectRoot ( $vendorParent )
    function getProjectRoot($vendorParent)
    {
        $dir = dirname($vendorParent);
        if (file_exists($vendorParent . DS . 'composer.json') || file_exists($vendorParent . DS . '.git') || file_exists($vendorParent . DS . '.svn') || file_exists($vendorParent . DS . '.hg') || file_exists($vendorParent . DS . 'index.php')) {
            return $vendorParent;
        } elseif ($dir != $vendorParent && $dir != '.') {
            return $this->getProjectRoot($dir);
        } else {
            return false;
        }
    }