Course › Week 6 · Laravel Go › Day 7 · lesson 42 of 42 · 40 min reading + 2 h practice
Tests and the Week 6 checkpoint
Tests through the full HTTP stack, and when to pick net/http, Laravel Go or PHP Laravel.
On this page
Every request this week was tried by hand. The Week 5 checkpoint built its own test database and fakes for the same reason this one does not need to: Laravel Go’s laraveltest gives each test a fresh database, fakes for the queue and the HTTP client, and a way to run a job or a workflow inside the test.
Then two bugs that pass a code review and fail a test, and the question the whole course leads to: for the next service, which of the three tools?
Tests through the whole app
1. tests.New
Every new app has tests/tests.go. Each test calls tests.New(t) and gets a client for an app built from the same bootstrap.Options as main.go:
package tests
import (
"testing"
"go.laravel.com/laraveltest"
"app/bootstrap"
)
func New(t testing.TB, with ...laraveltest.Option) *laraveltest.Client {
with = append([]laraveltest.Option{
laraveltest.Env(map[string]string{
"APP_ENV": "testing",
"APP_DEBUG": "true",
"BCRYPT_ROUNDS": "4",
"BROADCAST_CONNECTION": "discard",
"CACHE_STORE": "memory",
"FEATURE_STORE": "memory",
"INERTIA_SSR": "false",
"MAIL_MAILER": "log",
"OTEL_SDK_DISABLED": "true",
"QUEUE_CONNECTION": "sync",
"SEARCH_ENGINE": "database",
"SESSION_DRIVER": "memory",
"SMS_SENDER": "log",
"WORKFLOW_STORE": "memory",
}),
laraveltest.RefreshDatabase,
}, with...)
return laraveltest.New(t, bootstrap.Options(), with...)
}
The overrides make a test fast and alone: the cache and the sessions in memory, QUEUE_CONNECTION=sync, which runs a dispatched job at once, and WORKFLOW_STORE=memory. laraveltest.RefreshDatabase gives each test package its own copy of the database, named after DATABASE_URL (laravel_test_1, …), migrated once and kept between runs, and runs each test in a transaction that is rolled back at the end.
One consequence from the docs: ids keep counting across tests, because a rollback does not reset a sequence. Assert the ids the app returns, never 1.
2. The starter’s own test
The first go test ./... of this week’s app fails, and not in code of yours:
package feature_test
import (
"testing"
laravel "go.laravel.com"
"app/tests"
)
func TestTheAPIReportsLaravelsVersion(t *testing.T) {
client := tests.New(t)
client.GetJSON("/api/version").AssertOK().AssertJSON(map[string]string{"laravel": laravel.Version})
}
? app [no test files]
? app/bootstrap [no test files]
? app/commands [no test files]
? app/database/factories [no test files]
? app/database/migrations [no test files]
? app/database/schema [no test files]
? app/database/seeders [no test files]
? app/events [no test files]
? app/handlers/bookings [no test files]
? app/handlers/confirmations [no test files]
? app/handlers/decisions [no test files]
? app/handlers/reminders [no test files]
? app/handlers/welcome [no test files]
? app/jobs [no test files]
? app/listeners [no test files]
? app/models [no test files]
? app/resources [no test files]
? app/routes [no test files]
? app/services [no test files]
? app/tests [no test files]
--- FAIL: TestTheAPIReportsLaravelsVersion (0.17s)
api_test.go:14: want status 200 OK
the response is 404 Not Found
body: {"message":"Not Found"}
rendered from the error: *web.Error "Not Found"
api_test.go:14: want the JSON body to contain {"laravel":"0.1.0"}, but "laravel" is missing
the response is 404 Not Found
body: {"message":"Not Found"}
rendered from the error: *web.Error "Not Found"
FAIL
FAIL app/tests/feature 0.185s
? app/workflows [no test files]
FAILThe starter tested /api/version, and the routes lesson replaced the API function that registered it. The test is right that the route is gone; delete the test with the route, or keep the route. From here on, api_test.go is deleted.
3. A request, and the database
client.PostJSON sends the request through the whole app (middleware, validation, handler) without a port. The assertions chain, and each one reports what it expected and the response it got:
package feature_test
import (
"testing"
"time"
"go.laravel.com/date"
"go.laravel.com/db"
"go.laravel.com/laraveltest"
"go.laravel.com/model"
"app/models"
"app/tests"
)
// pendingBooking stores a property and one pending booking in the test's database.
func pendingBooking(t *testing.T, client *laraveltest.Client) models.Booking {
t.Helper()
property := models.Property{Name: "Fjord Cabin", City: "Bergen"}
if err := model.Create(client.Context(), &property); err != nil {
t.Fatal(err)
}
booking := models.Booking{
PropertyID: property.ID,
Guest: "Omar",
Email: "omar@example.com",
CheckIn: date.Date{Year: 2027, Month: time.February, Day: 2},
Nights: 7,
}
if err := model.Create(client.Context(), &booking); err != nil {
t.Fatal(err)
}
return booking
}
func TestStoringABookingSavesItAsPending(t *testing.T) {
client := tests.New(t)
property := pendingBooking(t, client).PropertyID
client.PostJSON("/api/bookings", map[string]any{
"property_id": property,
"guest": "Ali",
"email": "Ali@Example.com",
"check_in": "2027-03-01",
"nights": 2,
}).AssertCreated().AssertJSONPath("data.status", "pending")
client.AssertDatabaseHas("bookings", db.Values{"guest": "Ali", "email": "ali@example.com", "status": "pending"})
}
func TestABookingWithWrongValuesIsRefused(t *testing.T) {
client := tests.New(t)
client.PostJSON("/api/bookings", map[string]any{
"property_id": 999,
"guest": "",
"email": "nope",
"check_in": "2027-02-30",
"nights": 31,
}).AssertUnprocessable().AssertInvalid("property_id", "guest", "email", "check_in", "nights")
client.AssertDatabaseEmpty("bookings")
}
=== RUN TestStoringABookingSavesItAsPending
--- PASS: TestStoringABookingSavesItAsPending (0.17s)
=== RUN TestABookingWithWrongValuesIsRefused
--- PASS: TestABookingWithWrongValuesIsRefused (0.01s)
=== RUN TestTheWelcomePageRenders
time=2026-12-03T21:47:35.247+02:00 level=WARN msg="Vite has no build, so pages load no assets: run npm run build, or npm run dev" error="vite: the manifest can't be read: run `npm run build`, or `npm run dev` for the development server: stat /tmp/go-playbook/app/public/build/.vite/manifest.json: no such file or directory" request_id=af2f145f3eb94fdd40f016740f0d8105
--- PASS: TestTheWelcomePageRenders (0.01s)
PASS
ok app/tests/feature 0.201spendingBooking writes through client.Context(), the test’s own transaction, so the rows exist for the requests and vanish when the test ends. AssertDatabaseHas checks the stored email is lowercase, which only the transform tag guarantees (the routes lesson). AssertInvalid names the fields that must have failed, and AssertDatabaseEmpty that nothing was stored anyway.
TestTheWelcomePageRenders is the starter’s other test. Its warning says the frontend was never built (npm run build), which an API-only app can ignore.
4. A fake queue
queuetest.New(client) records dispatched jobs instead of running them:
package feature_test
import (
"fmt"
"testing"
"time"
"go.laravel.com/date"
"go.laravel.com/db"
"go.laravel.com/laraveltest"
"go.laravel.com/model"
"go.laravel.com/queuetest"
"app/jobs"
"app/models"
"app/tests"
)
// pendingBooking stores a property and one pending booking in the test's database.
func pendingBooking(t *testing.T, client *laraveltest.Client) models.Booking {
t.Helper()
property := models.Property{Name: "Fjord Cabin", City: "Bergen"}
if err := model.Create(client.Context(), &property); err != nil {
t.Fatal(err)
}
booking := models.Booking{
PropertyID: property.ID,
Guest: "Omar",
Email: "omar@example.com",
CheckIn: date.Date{Year: 2027, Month: time.February, Day: 2},
Nights: 7,
}
if err := model.Create(client.Context(), &booking); err != nil {
t.Fatal(err)
}
return booking
}
func TestStoringABookingSavesItAsPending(t *testing.T) {
client := tests.New(t)
property := pendingBooking(t, client).PropertyID
client.PostJSON("/api/bookings", map[string]any{
"property_id": property,
"guest": "Ali",
"email": "Ali@Example.com",
"check_in": "2027-03-01",
"nights": 2,
}).AssertCreated().AssertJSONPath("data.status", "pending")
client.AssertDatabaseHas("bookings", db.Values{"guest": "Ali", "email": "ali@example.com", "status": "pending"})
}
func TestABookingWithWrongValuesIsRefused(t *testing.T) {
client := tests.New(t)
client.PostJSON("/api/bookings", map[string]any{
"property_id": 999,
"guest": "",
"email": "nope",
"check_in": "2027-02-30",
"nights": 31,
}).AssertUnprocessable().AssertInvalid("property_id", "guest", "email", "check_in", "nights")
client.AssertDatabaseEmpty("bookings")
}
func TestAReminderIsQueuedForTheBooking(t *testing.T) {
client := tests.New(t)
queued := queuetest.New(client)
booking := pendingBooking(t, client)
client.PostJSON(fmt.Sprintf("/api/bookings/%d/reminders", booking.ID), map[string]any{"channel": "email"}).
AssertAccepted()
queued.AssertPushed(func(job queuetest.Job[jobs.SendReminder]) bool {
return job.Job.Booking.ID == booking.ID && job.Job.Channel == "email"
})
}
=== RUN TestStoringABookingSavesItAsPending
--- PASS: TestStoringABookingSavesItAsPending (0.14s)
=== RUN TestABookingWithWrongValuesIsRefused
--- PASS: TestABookingWithWrongValuesIsRefused (0.01s)
=== RUN TestAReminderIsQueuedForTheBooking
--- PASS: TestAReminderIsQueuedForTheBooking (0.01s)
=== RUN TestTheWelcomePageRenders
time=2026-12-03T21:47:41.538+02:00 level=WARN msg="Vite has no build, so pages load no assets: run npm run build, or npm run dev" error="vite: the manifest can't be read: run `npm run build`, or `npm run dev` for the development server: stat /tmp/go-playbook/app/public/build/.vite/manifest.json: no such file or directory" request_id=99f6a024d7e199f0e1bbb37df77bc9f6
--- PASS: TestTheWelcomePageRenders (0.01s)
PASS
ok app/tests/feature 0.177sThe match function receives each pushed SendReminder with its fields. The fake stores and reads back each job as the queue would, so a job the queue could not store would fail here, not in production.
5. A job, with a fake HTTP client
client.Attempt(job) runs one attempt of a job, as a worker would; httpclienttest.New(client) answers the app’s HTTP calls without the network. Here the fake Laravel app refuses the channel:
package feature_test
import (
"fmt"
"testing"
"time"
"go.laravel.com/date"
"go.laravel.com/db"
"go.laravel.com/httpclienttest"
"go.laravel.com/laraveltest"
"go.laravel.com/model"
"go.laravel.com/queuetest"
"app/jobs"
"app/models"
"app/tests"
)
// pendingBooking stores a property and one pending booking in the test's database.
func pendingBooking(t *testing.T, client *laraveltest.Client) models.Booking {
t.Helper()
property := models.Property{Name: "Fjord Cabin", City: "Bergen"}
if err := model.Create(client.Context(), &property); err != nil {
t.Fatal(err)
}
booking := models.Booking{
PropertyID: property.ID,
Guest: "Omar",
Email: "omar@example.com",
CheckIn: date.Date{Year: 2027, Month: time.February, Day: 2},
Nights: 7,
}
if err := model.Create(client.Context(), &booking); err != nil {
t.Fatal(err)
}
return booking
}
func TestStoringABookingSavesItAsPending(t *testing.T) {
client := tests.New(t)
property := pendingBooking(t, client).PropertyID
client.PostJSON("/api/bookings", map[string]any{
"property_id": property,
"guest": "Ali",
"email": "Ali@Example.com",
"check_in": "2027-03-01",
"nights": 2,
}).AssertCreated().AssertJSONPath("data.status", "pending")
client.AssertDatabaseHas("bookings", db.Values{"guest": "Ali", "email": "ali@example.com", "status": "pending"})
}
func TestABookingWithWrongValuesIsRefused(t *testing.T) {
client := tests.New(t)
client.PostJSON("/api/bookings", map[string]any{
"property_id": 999,
"guest": "",
"email": "nope",
"check_in": "2027-02-30",
"nights": 31,
}).AssertUnprocessable().AssertInvalid("property_id", "guest", "email", "check_in", "nights")
client.AssertDatabaseEmpty("bookings")
}
func TestAReminderIsQueuedForTheBooking(t *testing.T) {
client := tests.New(t)
queued := queuetest.New(client)
booking := pendingBooking(t, client)
client.PostJSON(fmt.Sprintf("/api/bookings/%d/reminders", booking.ID), map[string]any{"channel": "email"}).
AssertAccepted()
queued.AssertPushed(func(job queuetest.Job[jobs.SendReminder]) bool {
return job.Job.Booking.ID == booking.ID && job.Job.Channel == "email"
})
}
func TestARefusedReminderFailsWithoutRetrying(t *testing.T) {
client := tests.New(t)
laravel := httpclienttest.New(client).Respond("*/reminders", httpclienttest.JSON(map[string]string{
"message": "The selected channel is invalid.",
}).WithStatus(422))
booking := pendingBooking(t, client)
result := client.Attempt(jobs.SendReminder{Booking: booking, Channel: "fax"}).AssertFailed()
if result.Retryable {
t.Error("a reminder Laravel refused with 422 would be retried; it must fail at once")
}
laravel.AssertSentCount(1)
}
=== RUN TestStoringABookingSavesItAsPending
--- PASS: TestStoringABookingSavesItAsPending (0.16s)
=== RUN TestABookingWithWrongValuesIsRefused
--- PASS: TestABookingWithWrongValuesIsRefused (0.01s)
=== RUN TestAReminderIsQueuedForTheBooking
--- PASS: TestAReminderIsQueuedForTheBooking (0.01s)
=== RUN TestARefusedReminderFailsWithoutRetrying
--- PASS: TestARefusedReminderFailsWithoutRetrying (0.01s)
=== RUN TestTheWelcomePageRenders
time=2026-12-03T21:47:47.649+02:00 level=WARN msg="Vite has no build, so pages load no assets: run npm run build, or npm run dev" error="vite: the manifest can't be read: run `npm run build`, or `npm run dev` for the development server: stat /tmp/go-playbook/app/public/build/.vite/manifest.json: no such file or directory" request_id=a64fd60b7fcab2f6076ca0cef0e09dd4
--- PASS: TestTheWelcomePageRenders (0.01s)
PASS
ok app/tests/feature 0.216sAssertFailed checks that the attempt failed. Retryable says whether a worker would try it again, which is the rule of the queues lesson: a 422 must fail at once. AssertSentCount(1) checks the job made exactly one call.
6. A workflow, resumed and timed out
workflowtest.Start runs a workflow until it completes or suspends. Resume delivers a decision; client.Travel moves the app’s clock, and Advance wakes the run as a worker would:
package feature_test
import (
"fmt"
"testing"
"time"
"go.laravel.com/date"
"go.laravel.com/db"
"go.laravel.com/httpclienttest"
"go.laravel.com/laraveltest"
"go.laravel.com/model"
"go.laravel.com/queuetest"
"go.laravel.com/workflowtest"
"app/jobs"
"app/models"
"app/tests"
"app/workflows"
)
// pendingBooking stores a property and one pending booking in the test's database.
func pendingBooking(t *testing.T, client *laraveltest.Client) models.Booking {
t.Helper()
property := models.Property{Name: "Fjord Cabin", City: "Bergen"}
if err := model.Create(client.Context(), &property); err != nil {
t.Fatal(err)
}
booking := models.Booking{
PropertyID: property.ID,
Guest: "Omar",
Email: "omar@example.com",
CheckIn: date.Date{Year: 2027, Month: time.February, Day: 2},
Nights: 7,
}
if err := model.Create(client.Context(), &booking); err != nil {
t.Fatal(err)
}
return booking
}
func TestStoringABookingSavesItAsPending(t *testing.T) {
client := tests.New(t)
property := pendingBooking(t, client).PropertyID
client.PostJSON("/api/bookings", map[string]any{
"property_id": property,
"guest": "Ali",
"email": "Ali@Example.com",
"check_in": "2027-03-01",
"nights": 2,
}).AssertCreated().AssertJSONPath("data.status", "pending")
client.AssertDatabaseHas("bookings", db.Values{"guest": "Ali", "email": "ali@example.com", "status": "pending"})
}
func TestABookingWithWrongValuesIsRefused(t *testing.T) {
client := tests.New(t)
client.PostJSON("/api/bookings", map[string]any{
"property_id": 999,
"guest": "",
"email": "nope",
"check_in": "2027-02-30",
"nights": 31,
}).AssertUnprocessable().AssertInvalid("property_id", "guest", "email", "check_in", "nights")
client.AssertDatabaseEmpty("bookings")
}
func TestAReminderIsQueuedForTheBooking(t *testing.T) {
client := tests.New(t)
queued := queuetest.New(client)
booking := pendingBooking(t, client)
client.PostJSON(fmt.Sprintf("/api/bookings/%d/reminders", booking.ID), map[string]any{"channel": "email"}).
AssertAccepted()
queued.AssertPushed(func(job queuetest.Job[jobs.SendReminder]) bool {
return job.Job.Booking.ID == booking.ID && job.Job.Channel == "email"
})
}
func TestARefusedReminderFailsWithoutRetrying(t *testing.T) {
client := tests.New(t)
laravel := httpclienttest.New(client).Respond("*/reminders", httpclienttest.JSON(map[string]string{
"message": "The selected channel is invalid.",
}).WithStatus(422))
booking := pendingBooking(t, client)
result := client.Attempt(jobs.SendReminder{Booking: booking, Channel: "fax"}).AssertFailed()
if result.Retryable {
t.Error("a reminder Laravel refused with 422 would be retried; it must fail at once")
}
laravel.AssertSentCount(1)
}
func TestAnApprovedBookingIsConfirmed(t *testing.T) {
client := tests.New(t)
laravel := httpclienttest.New(client)
booking := pendingBooking(t, client)
token := workflows.DecisionToken(booking.ID)
run := workflowtest.Start(client, workflows.ConfirmBooking{BookingID: booking.ID, DecideWithinSeconds: 3600})
run.AssertWaitingFor(token)
run.Resume(token, workflows.Approved).AssertCompletedWith(models.Confirmed)
client.AssertDatabaseHas("bookings", db.Values{"id": booking.ID, "status": "confirmed"})
laravel.AssertSentCount(2)
}
func TestABookingNobodyAnsweredIsDeclined(t *testing.T) {
client := tests.New(t)
httpclienttest.New(client)
booking := pendingBooking(t, client)
run := workflowtest.Start(client, workflows.ConfirmBooking{BookingID: booking.ID, DecideWithinSeconds: 3600})
client.Travel(time.Hour + time.Minute)
run.Advance().AssertCompletedWith(models.Declined)
client.AssertDatabaseHas("bookings", db.Values{"id": booking.ID, "status": "declined"})
}
=== RUN TestStoringABookingSavesItAsPending
--- PASS: TestStoringABookingSavesItAsPending (0.22s)
=== RUN TestABookingWithWrongValuesIsRefused
--- PASS: TestABookingWithWrongValuesIsRefused (0.01s)
=== RUN TestAReminderIsQueuedForTheBooking
--- PASS: TestAReminderIsQueuedForTheBooking (0.01s)
=== RUN TestARefusedReminderFailsWithoutRetrying
--- PASS: TestARefusedReminderFailsWithoutRetrying (0.01s)
=== RUN TestAnApprovedBookingIsConfirmed
--- PASS: TestAnApprovedBookingIsConfirmed (0.01s)
=== RUN TestABookingNobodyAnsweredIsDeclined
--- PASS: TestABookingNobodyAnsweredIsDeclined (0.01s)
=== RUN TestTheWelcomePageRenders
time=2026-12-03T21:47:54.343+02:00 level=WARN msg="Vite has no build, so pages load no assets: run npm run build, or npm run dev" error="vite: the manifest can't be read: run `npm run build`, or `npm run dev` for the development server: stat /tmp/go-playbook/app/public/build/.vite/manifest.json: no such file or directory" request_id=82370a241390f0a1b0387807ad6a9d82
--- PASS: TestTheWelcomePageRenders (0.01s)
PASS
ok app/tests/feature 0.302sThe 48-hour wait of the workflows lesson is tested in milliseconds: no sleeping, no worker, no real Laravel app. AssertCompletedWith checks the value Handle returned, and the database assertion checks the step that saved it really ran.
Two bugs the tests catch
7. “The email is lowercased by Laravel anyway”
A clean-up removes transform:"lowercase" from StoreBooking, because the PHP app lowercases emails before it calls the API:
--- FAIL: TestStoringABookingSavesItAsPending (0.17s)
bookings_test.go:54: no row in bookings has email=ali@example.com guest=Ali status=pending
its first rows are:
check_in=2027-02-02 00:00:00 +0000 UTC created_at=2026-12-03 19:48:02.262037 +0000 UTC email=omar@example.com guest=Omar id=1 nights=7 property_id=1 status=pending updated_at=2026-12-03 19:48:02.262037 +0000 UTC
check_in=2027-03-01 00:00:00 +0000 UTC created_at=2026-12-03 19:48:02.264177 +0000 UTC email=Ali@Example.com guest=Ali id=2 nights=2 property_id=1 status=pending updated_at=2026-12-03 19:48:02.264177 +0000 UTC
FAIL
FAIL app/tests/feature 0.242s
FAILAssertDatabaseHas lists the first rows of the table when it fails, and the second row shows what happened: Ali@Example.com. The PHP app is not the only client of an API, and a unique index on email would treat the two spellings as two guests.
8. “One error branch is enough”
Someone simplifies SendReminder: every failed response returns an error, and the Tries setting handles the rest:
--- FAIL: TestARefusedReminderFailsWithoutRetrying (0.01s)
bookings_test.go:93: a reminder Laravel refused with 422 would be retried; it must fail at once
FAIL
FAIL app/tests/feature 0.245s
FAILThe attempt still fails, so AssertFailed alone would pass. Retryable is true now: in production the 422 would be sent twice more, a few seconds apart, before the job gave up. The test names the rule, so the next simplification cannot remove it quietly.
Which one, for the next service
net/http (Week 5) | Laravel Go (Week 6) | PHP Laravel | |
|---|---|---|---|
| Best for | a small, sharp service: one job, few routes, no admin pages | a Go service that needs queues, a database and tests, kept by a Laravel team | the product: pages, users, billing, everything the business changes every week |
| You write | routing, errors, background work, shutdown | the rules; the framework does the plumbing | the rules, with the largest ecosystem |
| Runs as | one binary | one binary, as server and as worker | PHP-FPM, a web server, queue workers |
| Dependencies | the standard library, plus what you choose | go.laravel.com, a beta before 1.0 | Composer packages |
| Risk | you own every line | APIs may change before 1.0: pin the version, read its UPGRADE.md | performance for CPU-heavy work |
For this course’s jobs: the CSV converter and logstat stay plain Go programs. The analysis service fits Laravel Go well, because Laravel developers will maintain it and it lives on a queue. The PHP app stays PHP. Laravel Go is a beta: what a 1.0 changes is unknown today, so a service built on it pins go.laravel.com to an exact version, as this week pinned v0.1.1.
The Week 6 exit check
| Check | How |
|---|---|
| Every feature has a test that goes through HTTP | go test ./..., against the _test copies of your database |
| Jobs are tested as attempts, workflows as runs | client.Attempt, workflowtest.Start, no worker and no sleeping |
| No test calls a real service | httpclienttest.New in every test whose code sends a request |
APP_DEBUG=false and a real APP_KEY in production | Read the production environment, not .env |
| The worker runs beside the server, and stops gracefully | Your process manager starts ./app queue:work, with a stop timeout over twice the longest job’s Timeout |
gofmt -l ., go vet ./... and staticcheck ./... print nothing | Run all three |
Coming from Laravel’s feature tests
<?php
namespace Tests\Feature;
use App\Jobs\SendReminder;
use App\Models\Booking;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Queue;
use Tests\TestCase;
class BookingTest extends TestCase
{
use RefreshDatabase;
public function test_a_reminder_is_queued_for_the_booking(): void
{
Queue::fake();
$booking = Booking::factory()->create();
$this->postJson("/api/bookings/{$booking->id}/reminders", ['channel' => 'email'])->assertAccepted();
Queue::assertPushed(SendReminder::class, fn ($job) => $job->booking->is($booking) && $job->channel === 'email');
}
}
The same test, almost word for word: RefreshDatabase, postJson, assertAccepted, Queue::fake() and assertPushed with a callback. The Go version has no Queue facade with global state: queuetest.New(client) fakes the queue of that one test’s app, which is why Go tests can run in parallel with t.Parallel().
Remember
- Test through HTTP with
tests.New; fake the queue and the HTTP client per test, never globally. - Test jobs as attempts and workflows as runs: no worker, no sleeping.
- Pin
go.laravel.comto an exact version until 1.0.
Next: what this week left out is in the module’s own docs/ folder, matched to the version you installed: authentication, mail, events, the scheduler, and Inertia pages.