protected function readEnvironmentFile()
    {
        $env_file_path = $this->getEnvironmentFilePath();

        if ($env_file_path) {
            $line_count = 0;
            $file = fopen($env_file_path, 'r');
            while ($line = fgets($file)) {
                $line++;
                $line = trim($line);
                if (empty($line)) {
                    continue;
                }

                // Ignore comments
                if(str_begins_with('//', $line) || str_begins_with('-', $line) || str_begins_with('#', $line)) {
                    continue;
                }

                if (putenv(str_replace("\n", '', trim($line))) === false) {
                    throw new TripalTestSuiteException("Could not read environment line $line_count: $line");
                }
            }
        }
    }