abstract class KernelTestCase extends TestCase

KernelTestCase is the base class for tests needing a Kernel.

Properties

static protected $class
static protected KernelInterface $kernel
static protected ContainerInterface $container

Methods

static string
getKernelClass()

No description

static KernelInterface
bootKernel(array $options = [])

Boots the Kernel for this test.

static KernelInterface
createKernel(array $options = [])

Creates a Kernel.

static 
ensureKernelShutdown()

Shuts the kernel down if it was used in the test.

tearDown()

Clean up Kernel usage in this test.

Details

at line 44
static protected string getKernelClass()

Return Value

string The Kernel class name

Exceptions

RuntimeException
LogicException

at line 62
static protected KernelInterface bootKernel(array $options = [])

Boots the Kernel for this test.

Parameters

array $options

Return Value

KernelInterface A KernelInterface instance

at line 85
static protected KernelInterface createKernel(array $options = [])

Creates a Kernel.

Available options:

  • environment
  • debug

Parameters

array $options

Return Value

KernelInterface A KernelInterface instance

at line 117
static protected ensureKernelShutdown()

Shuts the kernel down if it was used in the test.

at line 132
protected tearDown()

Clean up Kernel usage in this test.