trait InteractsWithTestCaseLifecycle (View source)

Properties

protected Application $app

The Illuminate application instance.

protected array $afterApplicationCreatedCallbacks

The callbacks that should be run after the application is created.

protected array $beforeApplicationDestroyedCallbacks

The callbacks that should be run before the application is destroyed.

protected Throwable $callbackException

The exception thrown while running an application destruction callback.

protected bool $setUpHasRun

Indicates if we have made it through the base setUp function.

Methods

void
setUpTheTestEnvironment()

Setup the test environment.

void
tearDownTheTestEnvironment()

Clean up the testing environment before the next test.

array
setUpTraits()

Boot the testing helper traits.

static void
tearDownAfterClassUsingTestCase()

Clean up the testing environment before the next test case.

void
afterApplicationCreated(callable $callback)

Register a callback to be run after the application is created.

void
beforeApplicationDestroyed(callable $callback)

Register a callback to be run before the application is destroyed.

void
callBeforeApplicationDestroyedCallbacks()

Execute the application's pre-destruction callbacks.

Details

protected void setUpTheTestEnvironment()

internal  
 

Setup the test environment.

Return Value

void

protected void tearDownTheTestEnvironment()

internal  
 

Clean up the testing environment before the next test.

Return Value

void

protected array setUpTraits()

Boot the testing helper traits.

Return Value

array

static void tearDownAfterClassUsingTestCase()

internal  
 

Clean up the testing environment before the next test case.

Return Value

void

void afterApplicationCreated(callable $callback)

Register a callback to be run after the application is created.

Parameters

callable $callback

Return Value

void

protected void beforeApplicationDestroyed(callable $callback)

Register a callback to be run before the application is destroyed.

Parameters

callable $callback

Return Value

void

protected void callBeforeApplicationDestroyedCallbacks()

Execute the application's pre-destruction callbacks.

Return Value

void