Exemple #1
0
 public function testEnv()
 {
     putenv('CUBEX_ENV');
     $cubex = new Cubex();
     $this->assertEquals('local', $cubex->env());
     $cubex->setEnv('rand');
     $this->assertEquals('rand', $cubex->env());
     $_ENV['CUBEX_ENV'] = 'prod';
     $cubex = new Cubex();
     $this->assertEquals('prod', $cubex->env());
     putenv('CUBEX_ENV=stage');
     $cubex = new Cubex();
     $this->assertEquals('stage', $cubex->env());
     putenv('CUBEX_ENV');
 }