Exemple #1
0
 /**
  * Returns a list of parameters provided by the kernel itself.
  *
  * Those parameters are available within the dependency injection container.
  *
  * @return array
  */
 protected function getParameters()
 {
     return array_merge(['kernel.root_dir' => realpath($this->getRootDir()) ?: $this->getRootDir(), 'kernel.cache_dir' => realpath($this->getCacheDir()) ?: $this->getCacheDir(), 'kernel.environment' => $this->environment, 'kernel.debug' => $this->debug], Env::getParameters(static::ENV_PREFIX));
 }
Exemple #2
0
 /**
  * @dataProvider parametersProvider
  */
 public function testGetParameters($key, $value, $expected)
 {
     $_SERVER[$key] = $value;
     $parameters = Env::getParameters(self::PREFIX);
     static::assertSame($value, $parameters[$expected]);
 }