TestKernel
class TestKernel extends CoreKernel
Kernel for running unit tests
Methods
Create a new kernel for this application
Reset kernel between tests.
Details
at line 12
__construct(string $basePath)
Create a new kernel for this application
in CoreKernel at line 151
string
getEnvironment()
deprecated
deprecated 5.0 use Director::get_environment_type() instead. Since 5.0 it should return only if kernel overrides. No checking SESSION or Environment.
Get the environment type
in CoreKernel at line 183
boot($flush = false)
in CoreKernel at line 558
shutdown()
Shutdowns the kernel.
in CoreKernel at line 562
Kernel
nest()
Nests this kernel, all components, and returns the nested value.
in CoreKernel at line 572
$this
activate()
Ensures this kernel is the active kernel after or during nesting
in CoreKernel at line 584
getNestedFrom()
in CoreKernel at line 589
Injector
getContainer()
in CoreKernel at line 594
$this
setInjectorLoader(InjectorLoader $injectorLoader)
in CoreKernel at line 603
InjectorLoader
getInjectorLoader()
Get loader for injector instance
in CoreKernel at line 608
ClassLoader
getClassLoader()
in CoreKernel at line 613
$this
setClassLoader(ClassLoader $classLoader)
in CoreKernel at line 619
ModuleLoader
getModuleLoader()
in CoreKernel at line 624
$this
setModuleLoader(ModuleLoader $moduleLoader)
in CoreKernel at line 630
$this
setEnvironment(string $environment)
Sets new environment
in CoreKernel at line 641
ConfigLoader
getConfigLoader()
in CoreKernel at line 646
$this
setConfigLoader(ConfigLoader $configLoader)
in CoreKernel at line 652
ThemeResourceLoader
getThemeResourceLoader()
in CoreKernel at line 657
$this
setThemeResourceLoader(ThemeResourceLoader $themeResourceLoader)
in CoreKernel at line 668
bool|null
isFlushed()
Returns whether the Kernel has been flushed on boot
at line 24
$this
reset()
Reset kernel between tests.
Note: this avoids resetting services (See TestState for service specific reset)