class Illuminate / Support / Testing / Fakes / QueueFake
You are viewing an older version of the documentation. For the latest, please visit master documentation.

QueueFake

Extends

Implements

Uses

Properties

protected

$jobs array

All of the jobs that have been pushed.

Default: []

Methods

public

assertPushed ( $job , $callback ) : void

Assert if a job was pushed based on a truth-test callback.

Parameters

  • $job string|Closure
  • $callback callable|int|null
protected

assertPushedTimes ( $job , $times ) : void

Assert if a job was pushed a number of times.

Parameters

  • $job string
  • $times int
public

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
public

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
public

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
protected

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
protected

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
protected

isChainOfObjects ( $chain ) : bool

Determine if the given chain is entirely composed of objects.

Parameters

  • $chain array
public

assertNotPushed ( $job , $callback ) : void

Determine if a job was pushed based on a truth-test callback.

Parameters

  • $job string|Closure
  • $callback callable|null
public

assertNothingPushed ( ) : void

Assert that no jobs were pushed.

public

pushed ( $job , $callback ) : Collection

Get all of the jobs matching a truth-test callback.

Parameters

  • $job string
  • $callback callable|null
public

hasPushed ( $job ) : bool

Determine if there are any stored jobs for a given class.

Parameters

  • $job string
public

connection ( $value ) : Queue

Resolve a queue connection instance.

Parameters

  • $value mixed
public

size ( $queue ) : int

Get the size of the queue.

Parameters

  • $queue string|null
public

push ( $job , $data , $queue ) : mixed

Push a new job onto the queue.

Parameters

  • $job string|object
  • $data mixed
  • $queue string|null
public

pushRaw ( $payload , $queue , array $options ) : mixed

Push a raw payload onto the queue.

Parameters

  • $payload string
  • $queue string|null
  • $options array
public

later ( $delay , $job , $data , $queue ) : mixed

Push a new job onto the queue after a delay.

Parameters

public

pushOn ( $queue , $job , $data ) : mixed

Push a new job onto the queue.

Parameters

  • $queue string
  • $job string|object
  • $data mixed
public

laterOn ( $queue , $delay , $job , $data ) : mixed

Push a new job onto the queue after a delay.

Parameters

public

pop ( $queue ) : Job |null

Pop the next job off of the queue.

Parameters

  • $queue string|null
public

bulk ( $jobs , $data , $queue ) : mixed

Push an array of jobs onto the queue.

Parameters

  • $jobs array
  • $data mixed
  • $queue string|null
public

pushedJobs ( ) : array

Get the jobs that have been pushed.

public

getConnectionName ( ) : string

Get the connection name for the queue.

public

setConnectionName ( $name ) : $this

Set the connection name for the queue.

Parameters

  • $name string
public

__call ( $method , $parameters ) : mixed

Override the QueueManager to prevent circular dependency.

Parameters

  • $method string
  • $parameters array