Test-driven development for Laravel with PHPUnit and Pest, factories, database testing, fakes, and coverage targets.
SkillScore100Maintained
Automatic
◆QA & Test Engineering pack
Last verified 8/15/2026
What it changes
Passed 23 of 23 test cases with the skill, and 19 of 23 without it.
Without skill83%
With skill100%
Checks it passed that the model alone missed
Uses Pest function syntax as the default test framework for new tests.
Includes uses(RefreshDatabase::class); to reset database state across test runs.
Compares retrieved model identity against created model ID using assertSame or Pest equivalent.
and 1 more in the full report
4 fixed19 passed either way0 still failing0 broke
Pass-rate lift
+17 pp
Tokens
+68%
Agent turns
0%
Response time
-32%
Model gemini-3.6-flashMeasured 8/15/2026v123 of 23 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 4
Prompt
I just built a REST API endpoint in my fresh Laravel application that lets authenticated users submit a new subscription request. When submitted, it creates a record in the database and dispatches a background job. Please write a test suite for this endpoint that validates successful record creation, handles auth, and verifies the dispatched background job without actually running queue workers.
What was checked, without and with the skill
Checked
Without skill
With skill
Uses Pest function syntax such as test() or it() rather than a PHPUnit TestCase class structure.
Missed
Passed
Fakes queue dispatches using Queue::fake() before triggering the request.
Passed
Passed
Includes RefreshDatabase trait or uses(RefreshDatabase::class) for database state management.
Passed
Passed
case-01 · gemini-3.6-flash · 8/15/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md277 linessingle file
Laravel TDD Workflow
Test-driven development for Laravel applications using PHPUnit and Pest with 80%+ coverage (unit + feature).
When to Use
New features or endpoints in Laravel
Bug fixes or refactors
Testing Eloquent models, policies, jobs, and notifications
Prefer Pest for new tests unless the project already standardizes on PHPUnit
Use Unit tests for pure business logic and services.
Use Feature tests for HTTP, auth, validation, and response shape.
Use Integration tests when validating DB/queues/external services together.
Database Strategy
RefreshDatabase for most feature/integration tests (runs migrations once per test run, then wraps each test in a transaction when supported; in-memory databases may re-migrate per test)
DatabaseTransactions when the schema is already migrated and you only need per-test rollback
DatabaseMigrations when you need a full migrate/fresh for every test and can afford the cost
Use RefreshDatabase as the default for tests that touch the database: for databases with transaction support, it runs migrations once per test run (via a static flag) and wraps each test in a transaction; for :memory: SQLite or connections without transactions, it migrates before each test. Use DatabaseTransactions when the schema is already migrated and you only need per-test rollbacks.