InteractsWithTestCaseLifecycle
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
Setup the test environment.
Clean up the testing environment before the next test.
Boot the testing helper traits.
Clean up the testing environment before the next test case.
Register a callback to be run after the application is created.
Register a callback to be run before the application is destroyed.
Execute the application's pre-destruction callbacks.
Details
protected void
setUpTheTestEnvironment()
internal |
Setup the test environment.
protected void
tearDownTheTestEnvironment()
internal |
Clean up the testing environment before the next test.
protected array
setUpTraits()
Boot the testing helper traits.
static void
tearDownAfterClassUsingTestCase()
internal |
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.
protected void
beforeApplicationDestroyed(callable $callback)
Register a callback to be run before the application is destroyed.
protected void
callBeforeApplicationDestroyedCallbacks()
Execute the application's pre-destruction callbacks.