ParallelTesting
class ParallelTesting (View source)
Properties
| protected Container | $container | The container instance. |
|
| protected Closure|null | $optionsResolver | The options resolver callback. |
|
| protected Closure|null | $tokenResolver | The token resolver callback. |
|
| protected array | $setUpProcessCallbacks | All of the registered "setUp" process callbacks. |
|
| protected array | $setUpTestCaseCallbacks | All of the registered "setUp" test case callbacks. |
|
| protected array | $setUpTestDatabaseBeforeMigratingCallbacks | All of the registered "setUp" test database callbacks prior to the migrations. |
|
| protected array | $setUpTestDatabaseCallbacks | All of the registered "setUp" test database callbacks. |
|
| protected array | $tearDownProcessCallbacks | All of the registered "tearDown" process callbacks. |
|
| protected array | $tearDownTestCaseCallbacks | All of the registered "tearDown" test case callbacks. |
Methods
Set a callback that should be used when resolving options.
Set a callback that should be used when resolving the unique process token.
Register a "setUp" process callback.
Register a "setUp" test case callback.
Register a "setUp" test database callback that runs prior to the migrations.
Register a "setUp" test database callback.
Register a "tearDown" process callback.
Register a "tearDown" test case callback.
Call all of the "setUp" process callbacks.
Call all of the "setUp" test database callbacks that run prior to migrations.
Call all of the "setUp" test database callbacks.
Call all of the "tearDown" process callbacks.
Get a parallel testing option.
Gets a unique test token.
Apply the callback if tests are running in parallel.
Indicates if the current tests are been run in parallel.
Details
__construct(Container $container)
Create a new parallel testing instance.
void
resolveOptionsUsing(Closure|null $resolver)
Set a callback that should be used when resolving options.
void
resolveTokenUsing(Closure|null $resolver)
Set a callback that should be used when resolving the unique process token.
void
setUpProcess(callable $callback)
Register a "setUp" process callback.
void
setUpTestCase(callable $callback)
Register a "setUp" test case callback.
void
setUpTestDatabaseBeforeMigrating(callable $callback)
Register a "setUp" test database callback that runs prior to the migrations.
void
setUpTestDatabase(callable $callback)
Register a "setUp" test database callback.
void
tearDownProcess(callable $callback)
Register a "tearDown" process callback.
void
tearDownTestCase(callable $callback)
Register a "tearDown" test case callback.
void
callSetUpProcessCallbacks()
Call all of the "setUp" process callbacks.
void
callSetUpTestCaseCallbacks(TestCase $testCase)
Call all of the "setUp" test case callbacks.
void
callSetUpTestDatabaseBeforeMigratingCallbacks(string $database)
Call all of the "setUp" test database callbacks that run prior to migrations.
void
callSetUpTestDatabaseCallbacks(string $database)
Call all of the "setUp" test database callbacks.
void
callTearDownProcessCallbacks()
Call all of the "tearDown" process callbacks.
void
callTearDownTestCaseCallbacks(TestCase $testCase)
Call all of the "tearDown" test case callbacks.
mixed
option(string $option)
Get a parallel testing option.
string|false
token()
Gets a unique test token.
protected void
whenRunningInParallel(callable $callback)
Apply the callback if tests are running in parallel.
protected bool
inParallel()
Indicates if the current tests are been run in parallel.