Beispiel #1
0
 /**
  * Instantiate a new Web.
  *
  * Objects and parameters can be passed as argument to the constructor.
  *
  * @param array $values The parameters or objects.
  */
 public function __construct(array $values = array(), $appPath = null, $user = null, $env = null, $cache = false)
 {
     parent::__construct($values);
     $appPath = Environment::getAppPath(null, $appPath);
     $env = Environment::getENV(null, $env);
     $user = Environment::getUser(null, $user);
     $this->configure($appPath, $user, $env, $cache ? true : false);
 }
 /**
  * test getENV Method
  */
 public function testGetENV()
 {
     putenv("SKIP_ENV=test");
     $cliInput = new StringInput('--skip-user=notenv');
     $cliInput->bind($this->cliInputDefinition);
     $env = Environment::getENV($cliInput);
     $this->assertEquals("test", $env);
     $env = Environment::getENV();
     $this->assertEquals("test", $env);
     $cliInput = new StringInput('--skip-env=development');
     $cliInput->bind($this->cliInputDefinition);
     $env = Environment::getENV($cliInput);
     $this->assertEquals("development", $env);
 }