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 189
boot($flush = false)
in CoreKernel at line 561
shutdown()
Shutdowns the kernel.
in CoreKernel at line 565
Kernel
nest()
Nests this kernel, all components, and returns the nested value.
in CoreKernel at line 575
$this
activate()
Ensures this kernel is the active kernel after or during nesting
in CoreKernel at line 587
getNestedFrom()
in CoreKernel at line 592
Injector
getContainer()
in CoreKernel at line 597
$this
setInjectorLoader(InjectorLoader $injectorLoader)
in CoreKernel at line 606
InjectorLoader
getInjectorLoader()
Get loader for injector instance
in CoreKernel at line 611
ClassLoader
getClassLoader()
in CoreKernel at line 616
$this
setClassLoader(ClassLoader $classLoader)
in CoreKernel at line 622
ModuleLoader
getModuleLoader()
in CoreKernel at line 627
$this
setModuleLoader(ModuleLoader $moduleLoader)
in CoreKernel at line 633
$this
setEnvironment(string $environment)
Sets new environment
in CoreKernel at line 644
ConfigLoader
getConfigLoader()
in CoreKernel at line 649
$this
setConfigLoader(ConfigLoader $configLoader)
in CoreKernel at line 655
ThemeResourceLoader
getThemeResourceLoader()
in CoreKernel at line 660
$this
setThemeResourceLoader(ThemeResourceLoader $themeResourceLoader)
in CoreKernel at line 671
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)