public function testDetect() { $env = Environment::detect(); $this->assertEquals('development', $env); putenv("PHP_ROXPHP_ENV=production"); $env = Environment::detect(); $this->assertEquals('production', $env); }
<?php use rox\util\Environment; $environment = Environment::detect(); require_once __DIR__ . "/environments/{$environment}.php";