TestKernel
class TestKernel extends CoreKernel (View source)
Kernel for running unit tests
Methods
__construct(string $basePath)
Create a new kernel for this application
$this
from
CoreKernel
$this
reset()
Reset kernel between tests.
Details
__construct(string $basePath)
Create a new kernel for this application
string
getEnvironment()
deprecated
deprecated
Get the environment type
boot($flush = false)
shutdown()
Shutdowns the kernel.
Kernel
nest()
Nests this kernel, all components, and returns the nested value.
$this
activate()
Ensures this kernel is the active kernel after or during nesting
getNestedFrom()
Injector
getContainer()
$this
setInjectorLoader(InjectorLoader $injectorLoader)
InjectorLoader
getInjectorLoader()
Get loader for injector instance
ClassLoader
getClassLoader()
$this
setClassLoader(ClassLoader $classLoader)
ModuleLoader
getModuleLoader()
$this
setModuleLoader(ModuleLoader $moduleLoader)
$this
setEnvironment(string $environment)
Sets new environment
ConfigLoader
getConfigLoader()
$this
setConfigLoader(ConfigLoader $configLoader)
ThemeResourceLoader
getThemeResourceLoader()
$this
setThemeResourceLoader(ThemeResourceLoader $themeResourceLoader)
bool|null
isFlushed()
Returns whether the Kernel has been flushed on boot
$this
reset()
Reset kernel between tests.
Note: this avoids resetting services (See TestState for service specific reset)