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 $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

void
__construct(Container $container)

Create a new parallel testing instance.

void
resolveOptionsUsing($resolver)

Set a callback that should be used when resolving options.

void
resolveTokenUsing($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
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
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.

int|false
token()

Gets a unique test token.

void
whenRunningInParallel(callable $callback)

Apply the callback if tests are running in parallel.

bool
inParallel()

Indicates if the current tests are been run in parallel.

Details

void __construct(Container $container)

Create a new parallel testing instance.

Parameters

Container $container

Return Value

void

void resolveOptionsUsing($resolver)

Set a callback that should be used when resolving options.

Parameters

$resolver

Return Value

void

void resolveTokenUsing($resolver)

Set a callback that should be used when resolving the unique process token.

Parameters

$resolver

Return Value

void

void setUpProcess(callable $callback)

Register a "setUp" process callback.

Parameters

callable $callback

Return Value

void

void setUpTestCase(callable $callback)

Register a "setUp" test case callback.

Parameters

callable $callback

Return Value

void

void setUpTestDatabase(callable $callback)

Register a "setUp" test database callback.

Parameters

callable $callback

Return Value

void

void tearDownProcess(callable $callback)

Register a "tearDown" process callback.

Parameters

callable $callback

Return Value

void

void tearDownTestCase(callable $callback)

Register a "tearDown" test case callback.

Parameters

callable $callback

Return Value

void

void callSetUpProcessCallbacks()

Call all of the "setUp" process callbacks.

Return Value

void

void callSetUpTestCaseCallbacks(TestCase $testCase)

Call all of the "setUp" test case callbacks.

Parameters

TestCase $testCase

Return Value

void

void callSetUpTestDatabaseCallbacks(string $database)

Call all of the "setUp" test database callbacks.

Parameters

string $database

Return Value

void

void callTearDownProcessCallbacks()

Call all of the "tearDown" process callbacks.

Return Value

void

void callTearDownTestCaseCallbacks(TestCase $testCase)

Call all of the "tearDown" test case callbacks.

Parameters

TestCase $testCase

Return Value

void

mixed option(string $option)

Get a parallel testing option.

Parameters

string $option

Return Value

mixed

int|false token()

Gets a unique test token.

Return Value

int|false

protected void whenRunningInParallel(callable $callback)

Apply the callback if tests are running in parallel.

Parameters

callable $callback

Return Value

void

protected bool inParallel()

Indicates if the current tests are been run in parallel.

Return Value

bool