QueueFake
Extends
Implements
Uses
Properties
$jobsToFake Illuminate\...\Collection
The job types that should be intercepted instead of pushed to the queue.
$jobsToBeQueued Illuminate\...\Collection
The job types that should be pushed to the queue and not intercepted.
$jobs array
All of the jobs that have been pushed.
Methods
__construct ( $app , $jobsToFake , $queue ) : void
Create a new fake queue instance.
Parameters
- $app Application
- $jobsToFake array
- $queue QueueManager |null
except ( $jobsToBeQueued ) : $this
Specify the jobs that should be queued instead of faked.
Parameters
- $jobsToBeQueued array|string
assertPushed ( $job , $callback ) : void
Assert if a job was pushed based on a truth-test callback.
Parameters
- $job string|Closure
- $callback callable|int|null
assertPushedTimes ( $job , $times ) : void
Assert if a job was pushed a number of times.
Parameters
- $job string
- $times int
assertPushedOn ( $queue , $job , $callback ) : void
Assert if a job was pushed based on a truth-test callback.
Parameters
- $queue string
- $job string|Closure
- $callback callable|null
assertPushedWithChain ( $job , $expectedChain , $callback ) : void
Assert if a job was pushed with chained jobs based on a truth-test callback.
Parameters
- $job string
- $expectedChain array
- $callback callable|null
assertPushedWithoutChain ( $job , $callback ) : void
Assert if a job was pushed with an empty chain based on a truth-test callback.
Parameters
- $job string
- $callback callable|null
assertPushedWithChainOfObjects ( $job , $expectedChain , $callback ) : void
Assert if a job was pushed with chained jobs based on a truth-test callback.
Parameters
- $job string
- $expectedChain array
- $callback callable|null
assertPushedWithChainOfClasses ( $job , $expectedChain , $callback ) : void
Assert if a job was pushed with chained jobs based on a truth-test callback.
Parameters
- $job string
- $expectedChain array
- $callback callable|null
assertClosurePushed ( $callback ) : void
Assert if a closure was pushed based on a truth-test callback.
Parameters
- $callback callable|int|null
assertClosureNotPushed ( $callback ) : void
Assert that a closure was not pushed based on a truth-test callback.
Parameters
- $callback callable|null
isChainOfObjects ( $chain ) : bool
Determine if the given chain is entirely composed of objects.
Parameters
- $chain array
assertNotPushed ( $job , $callback ) : void
Determine if a job was pushed based on a truth-test callback.
Parameters
- $job string|Closure
- $callback callable|null
assertNothingPushed ( ) : void
Assert that no jobs were pushed.
pushed ( $job , $callback ) : Illuminate\...\Collection
Get all of the jobs matching a truth-test callback.
Parameters
- $job string
- $callback callable|null
hasPushed ( $job ) : bool
Determine if there are any stored jobs for a given class.
Parameters
- $job string
size ( $queue ) : int
Get the size of the queue.
Parameters
- $queue string|null
push ( $job , $data , $queue ) : mixed
Push a new job onto the queue.
Parameters
- $job string|object
- $data mixed
- $queue string|null
shouldFakeJob ( $job ) : bool
Determine if a job should be faked or actually dispatched.
Parameters
- $job object
shouldDispatchJob ( $job ) : bool
Determine if a job should be pushed to the queue instead of faked.
Parameters
- $job object
pushRaw ( $payload , $queue , array $options ) : mixed
Push a raw payload onto the queue.
Parameters
- $payload string
- $queue string|null
- $options array
later ( $delay , $job , $data , $queue ) : mixed
Push a new job onto the queue after (n) seconds.
Parameters
- $delay DateTimeInterface |DateInterval |int
- $job string|object
- $data mixed
- $queue string|null
pushOn ( $queue , $job , $data ) : mixed
Push a new job onto the queue.
Parameters
- $queue string
- $job string|object
- $data mixed
laterOn ( $queue , $delay , $job , $data ) : mixed
Push a new job onto a specific queue after (n) seconds.
Parameters
- $queue string
- $delay DateTimeInterface |DateInterval |int
- $job string|object
- $data mixed
bulk ( $jobs , $data , $queue ) : mixed
Push an array of jobs onto the queue.
Parameters
- $jobs array
- $data mixed
- $queue string|null
pushedJobs ( ) : array
Get the jobs that have been pushed.
getConnectionName ( ) : string
Get the connection name for the queue.
setConnectionName ( $name ) : $this
Set the connection name for the queue.
Parameters
- $name string
__call ( $method , $parameters ) : mixed
Override the QueueManager to prevent circular dependency.
Parameters
- $method string
- $parameters array