class
Illuminate
/
Foundation
/
Testing
/
TestCase
You are viewing an older version of the documentation. For the latest, please visit master documentation.
abstract
TestCase
Extends
-
PHPUnit\...\TestCase
Uses
- InteractsWithContainer
- MakesHttpRequests
- InteractsWithAuthentication
- InteractsWithConsole
- InteractsWithDatabase
- InteractsWithDeprecationHandling
- InteractsWithExceptionHandling
- InteractsWithSession
- InteractsWithTime
- InteractsWithViews
- MocksApplicationServices
Properties
protected
$afterApplicationCreatedCallbacks array
The callbacks that should be run after the application is created.
Default: []
protected
$beforeApplicationDestroyedCallbacks array
The callbacks that should be run before the application is destroyed.
Default: []
protected
$callbackException Throwable
The exception thrown while running an application destruction callback.
Default: null
protected
$setUpHasRun bool
Indicates if we have made it through the base setUp function.
Default: false
Methods
public
abstract
createApplication ( ) : Symfony\...\HttpKernelInterface
Creates the application.
protected
setUp ( ) : void
Setup the test environment.
protected
refreshApplication ( ) : void
Refresh the application instance.
protected
setUpTraits ( ) : array
Boot the testing helper traits.
protected
tearDown ( ) : void
Clean up the testing environment before the next test.
public
afterApplicationCreated ( callable $callback ) : void
Register a callback to be run after the application is created.
Parameters
- $callback callable
protected
beforeApplicationDestroyed ( callable $callback ) : void
Register a callback to be run before the application is destroyed.
Parameters
- $callback callable
protected
callBeforeApplicationDestroyedCallbacks ( ) : void
Execute the application's pre-destruction callbacks.