abstract class WebTestCase extends KernelTestCase

WebTestCase is the base class for functional tests.

Properties

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

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.

static Client
createClient(array $options = [], array $server = [])

Creates a Client.

Details

in KernelTestCase at line 44
static protected string getKernelClass()

Return Value

string The Kernel class name

Exceptions

RuntimeException
LogicException

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

Boots the Kernel for this test.

Parameters

array $options

Return Value

KernelInterface A KernelInterface instance

in KernelTestCase 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

in KernelTestCase at line 117
static protected ensureKernelShutdown()

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

in KernelTestCase at line 132
protected tearDown()

Clean up Kernel usage in this test.

at line 32
static protected Client createClient(array $options = [], array $server = [])

Creates a Client.

Parameters

array $options An array of options to pass to the createKernel method
array $server An array of server parameters

Return Value

Client A Client instance