PendingBatchFake

class PendingBatchFake extends PendingBatch (View source)

Properties

protected Container $container The IoC container instance. from PendingBatch
string $name The batch name. from PendingBatch
Collection $jobs The jobs that belong to the batch. from PendingBatch
array $options The batch options. from PendingBatch
protected BusFake $bus The fake bus instance.

Methods

void __construct(BusFake $bus, Collection $jobs)

Create a new pending batch instance.

$this then(callable $callback)

Add a callback to be executed after all jobs in the batch have executed successfully.

from PendingBatch
array thenCallbacks()

Get the "then" callbacks that have been registered with the pending batch.

from PendingBatch
$this catch(callable $callback)

Add a callback to be executed after the first failing job in the batch.

from PendingBatch
array catchCallbacks()

Get the "catch" callbacks that have been registered with the pending batch.

from PendingBatch
$this finally(callable $callback)

Add a callback to be executed after the batch has finished executing.

from PendingBatch
array finallyCallbacks()

Get the "finally" callbacks that have been registered with the pending batch.

from PendingBatch
$this allowFailures(bool $allowFailures = true)

Indicate that the batch should not be cancelled when a job within the batch fails.

from PendingBatch
bool allowsFailures()

Determine if the pending batch allows jobs to fail without cancelling the batch.

from PendingBatch
$this name(string $name)

Set the name for the batch.

from PendingBatch
$this onConnection(string $connection)

Specify the queue connection that the batched jobs should run on.

from PendingBatch
string|null connection()

Get the connection used by the pending batch.

from PendingBatch
$this onQueue(string $queue)

Specify the queue that the batched jobs should run on.

from PendingBatch
string|null queue()

Get the queue used by the pending batch.

from PendingBatch
Batch dispatch()

Dispatch the batch.

Details

void __construct(BusFake $bus, Collection $jobs)

Create a new pending batch instance.

Parameters

BusFake $bus
Collection $jobs

Return Value

void

$this then(callable $callback)

Add a callback to be executed after all jobs in the batch have executed successfully.

Parameters

callable $callback

Return Value

$this

array thenCallbacks()

Get the "then" callbacks that have been registered with the pending batch.

Return Value

array

$this catch(callable $callback)

Add a callback to be executed after the first failing job in the batch.

Parameters

callable $callback

Return Value

$this

array catchCallbacks()

Get the "catch" callbacks that have been registered with the pending batch.

Return Value

array

$this finally(callable $callback)

Add a callback to be executed after the batch has finished executing.

Parameters

callable $callback

Return Value

$this

array finallyCallbacks()

Get the "finally" callbacks that have been registered with the pending batch.

Return Value

array

$this allowFailures(bool $allowFailures = true)

Indicate that the batch should not be cancelled when a job within the batch fails.

Parameters

bool $allowFailures

Return Value

$this

bool allowsFailures()

Determine if the pending batch allows jobs to fail without cancelling the batch.

Return Value

bool

$this name(string $name)

Set the name for the batch.

Parameters

string $name

Return Value

$this

$this onConnection(string $connection)

Specify the queue connection that the batched jobs should run on.

Parameters

string $connection

Return Value

$this

string|null connection()

Get the connection used by the pending batch.

Return Value

string|null

$this onQueue(string $queue)

Specify the queue that the batched jobs should run on.

Parameters

string $queue

Return Value

$this

string|null queue()

Get the queue used by the pending batch.

Return Value

string|null

Batch dispatch()

Dispatch the batch.

Return Value

Batch

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Support/Testing/Fakes/PendingBatchFake.html