public function testCommentedLoadsVars() { $dotenv = new DotEnv($this->fixturesFolder, 'commented.env'); $dotenv->load(); $this->assertEquals('bar', getenv('CFOO')); $this->assertEquals(false, getenv('CBAR')); $this->assertEquals(false, getenv('CZOO')); $this->assertEquals('with spaces', getenv('CSPACED')); $this->assertEquals('a value with a # character', getenv('CQUOTES')); $this->assertEquals('a value with a # character & a quote " character inside quotes', getenv('CQUOTESWITHQUOTE')); $this->assertEquals('', getenv('CNULL')); }
/** * Constructor. * Sets up the environment login and service class instances. * @throws ErrorException */ public function __construct() { static::$instance = $this; $this->testing(DotEnv::findEnvironmentVariable('PHX_ENV') === "testing"); $this->serviceUsername = DotEnv::findEnvironmentVariable('PHX_USER'); $this->servicePassword = DotEnv::findEnvironmentVariable('PHX_PASS'); // Create the additional service provider instances. foreach ($this->providers as $provider => $class) { $this->{$provider} = new $class($this); } }