Skip to content

Debugging

Dumping Pushed Jobs

php
use Havn\Executable\Testing\Facades\Execution;

Queue::fake();

// Dump all queued jobs for a specific executable
ProcessOrder::assert()->dump();

// Dump inside a where() callback to inspect individual jobs
ProcessOrder::assert()
    ->queued()
    ->where(function (PushedJob $job) {
        $job->dump(); // prints a structured summary
        return true;
    });

// Dump all queued jobs globally
Execution::dumpJobs();

Dumping Batches

php
use Havn\Executable\Testing\Facades\Execution;

Bus::fake();

Execution::dumpBatches();

Available Methods

PushedJob and PushedBatch both provide:

MethodPurpose
dump()Print a structured summary
dd()Dump and die
summary()Return the summary as an array (see below)

PushedJob::summary() returns keys: executable, arguments, chain. PushedBatch::summary() returns keys: name, connection, queue, allowsFailures, jobs_count, jobs, and callback counts (progress_callbacks_count, then_callbacks_count, catch_callbacks_count, before_callbacks_count, finally_callbacks_count).