Skip to content

Instantly share code, notes, and snippets.

@denyadzi
Created January 20, 2014 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save denyadzi/8520964 to your computer and use it in GitHub Desktop.
Save denyadzi/8520964 to your computer and use it in GitHub Desktop.
from symfony sources : Symfony\Bundle\FrameworkBundle\Test\WebTestCase
/**
* Creates a Kernel.
*
* Available options:
*
* * environment
* * debug
*
* @param array $options An array of options
*
* @return KernelInterface A KernelInterface instance
*/
protected static function createKernel(array $options = array())
{
if (null === static::$class) {
static::$class = static::getKernelClass();
}
return new static::$class(
isset($options['environment']) ? $options['environment'] : 'test',
isset($options['debug']) ? $options['debug'] : true
);
}
/**
* Creates a Kernel.
*
* Available options:
*
* * environment
* * debug
*
* @param array $options An array of options
*
* @return KernelInterface A KernelInterface instance
*/
protected static function createKernel(array $options = array())
{
if (null === static::$class) {
static::$class = static::getKernelClass();
}
return new static::$class(
isset($options['environment']) ? $options['environment'] : 'test',
isset($options['debug']) ? $options['debug'] : true
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment