src/Services/BootstrapDrupal.php
protected function getEnvironmentFilePath()
    {
        $dir = getcwd();

        // If running phpunit from the module root dir
        if (file_exists($dir.'/tests/.env')) {
            return $dir.'/tests/.env';
        }

        // If running phpunit from the module root dir
        if (file_exists($dir.'/test/.env')) {
            return $dir.'/test/.env';
        }

        // If running php unit from within the tests dir
        if (file_exists($dir.'/.env')) {
            return $dir.'/.env';
        }

        return false;
    }
protected function getEnvironmentFilePath()
    {
        $dir = getcwd();

        // If running phpunit from the module root dir
        if (file_exists($dir.'/tests/.env')) {
            return $dir.'/tests/.env';
        }

        // If running phpunit from the module root dir
        if (file_exists($dir.'/test/.env')) {
            return $dir.'/test/.env';
        }

        // If running php unit from within the tests dir
        if (file_exists($dir.'/.env')) {
            return $dir.'/.env';
        }

        return false;
    }
Look for environment variable file.

@return bool|string