setEnvironment() public method

Set application environment
public setEnvironment ( string $environment ) : void
$environment string
return void
Example #1
0
 /**
  * Init instance
  *
  * @return Instance
  */
 protected static function initInstance()
 {
     $instance = new Instance();
     $instance->setPath(Application::getInstance()->getPath());
     $instance->setEnvironment(Application::getInstance()->getEnvironment());
     $instance->init();
     return $instance;
 }
Example #2
0
 /**
  * @covers Bluz\Config\Config::getModuleData
  */
 public function testGetModuleDataBySectionWithEnvironment()
 {
     $this->config->setPath($this->path);
     $this->config->setEnvironment('testing');
     $this->assertEquals('baz', $this->config->getModuleData('index', 'foo'));
 }