EnvironmentTest.php (559B)
1 <?php 2 3 class EnvironmentTest extends PHPUnit_Framework_TestCase 4 { 5 public function testGetDefault() 6 { 7 // call for environment should return "development" 8 $this->assertEquals('development', Environment::get()); 9 } 10 11 public function testGetDevelopment() 12 { 13 putenv('APPLICATION_ENV=development'); 14 // call for environment should return "development" 15 $this->assertEquals('development', Environment::get()); 16 } 17 18 public function testGetProduction() 19 { 20 putenv('APPLICATION_ENV=production'); 21 $this->assertEquals('production', Environment::get()); 22 } 23 }