phpunit
OfficialStandardized PHPUnit tests for Laravel.
Authorcodebar-ag
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Establishes a clear, consistent set of PHPUnit conventions for Laravel projects, helping teams write reliable, maintainable tests.
Core Features & Use Cases
- Structure tests with Feature tests in tests/Feature and Unit tests in tests/Unit.
- Feature tests should use RefreshDatabase when touching the database; Unit tests run without Laravel bootstrap.
- Use test_ prefix with snake_case names and a void return type.
- Prefer assertSame over assertEquals for strict type/value checks and assert specific values.
- Every new model should have a corresponding factory in database/factories and tests should use factories instead of manual create/insert.
- Use factories with states to cover variations and edge cases.
Quick Start
Run phpunit to execute your Laravel tests and verify feature, unit, and factory conventions.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: phpunit Download link: https://github.com/codebar-ag/coding-guidelines/archive/main.zip#phpunit Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.