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
| 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.
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Foundation/Testing/Concerns/InteractsWithTestCaseLifecycle.html