ParallelTesting
class ParallelTesting
Properties
| protected Closure|null | $optionsResolver | The options resolver callback. |
|
| protected Closure|null | $tokenResolver | The token resolver callback. |
|
| protected list<callable> | $setUpProcessCallbacks | All of the registered "setUp" process callbacks. |
|
| protected list<callable> | $setUpTestCaseCallbacks | All of the registered "setUp" test case callbacks. |
|
| protected list<callable> | $setUpTestDatabaseBeforeMigratingCallbacks | All of the registered "setUp" test database callbacks prior to migrations. |
|
| protected list<callable> | $setUpTestDatabaseCallbacks | All of the registered "setUp" test database callbacks. |
|
| protected list<callable> | $tearDownProcessCallbacks | All of the registered "tearDown" process callbacks. |
|
| protected list<callable> | $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 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 case 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.
Call all of the "tearDown" test case callbacks.
Get a parallel testing option.
Get the unique test token.
Check if tests are running in parallel.
Get a unique temporary directory path for the current test process.
Apply the callback if tests are running in parallel.
Details
at line 68
__construct(Container $container)
Create a new parallel testing instance.
at line 76
void
resolveOptionsUsing(Closure|null $resolver)
Set a callback that should be used when resolving options.
at line 84
void
resolveTokenUsing(Closure|null $resolver)
Set a callback that should be used when resolving the unique process token.
at line 92
void
setUpProcess(callable $callback)
Register a "setUp" process callback.
at line 100
void
setUpTestCase(callable $callback)
Register a "setUp" test case callback.
at line 108
void
setUpTestDatabaseBeforeMigrating(callable $callback)
Register a "setUp" test database callback that runs prior to migrations.
at line 116
void
setUpTestDatabase(callable $callback)
Register a "setUp" test database callback.
at line 124
void
tearDownProcess(callable $callback)
Register a "tearDown" process callback.
at line 132
void
tearDownTestCase(callable $callback)
Register a "tearDown" test case callback.
at line 140
void
callSetUpProcessCallbacks()
Call all of the "setUp" process callbacks.
at line 154
void
callSetUpTestCaseCallbacks(mixed $testCase)
Call all of the "setUp" test case callbacks.
at line 169
void
callSetUpTestDatabaseBeforeMigratingCallbacks(string $database)
Call all of the "setUp" test database callbacks that run prior to migrations.
at line 184
void
callSetUpTestDatabaseCallbacks(string $database)
Call all of the "setUp" test database callbacks.
at line 199
void
callTearDownProcessCallbacks()
Call all of the "tearDown" process callbacks.
at line 213
void
callTearDownTestCaseCallbacks(mixed $testCase)
Call all of the "tearDown" test case callbacks.
at line 228
mixed
option(string $option)
Get a parallel testing option.
at line 242
string|false
token()
Get the unique test token.
at line 252
bool
inParallel()
Check if tests are running in parallel.
at line 263
static string
tempDir(string $suffix = '')
Get a unique temporary directory path for the current test process.
Incorporates TEST_TOKEN (parallel worker ID) and PID to prevent cross-worker filesystem collisions under ParaTest.
at line 276
protected void
whenRunningInParallel(callable $callback)
Apply the callback if tests are running in parallel.