Laravel Tdd
Laravel test-first workflow with PHPUnit or Pest covering factories, HTTP tests, and Sanctum authentication.
- CCM score
- 69 of 100
- skills.sh installs
- 12.8K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers red-green-refactor feature development for Eloquent models, relationships, scopes, controllers, and JSON APIs
- Includes PHPUnit XML config with Unit and Feature suites, a base TestCase with admin and user helpers, and factories with state methods
- Provides HTTP assertions for redirects, validation errors, database state, and authorization (403) checks
- Designed for Laravel projects using Sanctum or Passport authentication and needing mocking of queues, mail, and HTTP
Install
$ npx -y skills add affaan-m/ecc --skill laravel-tdd -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Laravel Testing with TDD
Test-driven development for Laravel applications using PHPUnit, Pest, Laravel factories, and testing helpers.
When to Activate
- Writing new Laravel applications or features
- Implementing API endpoints with Sanctum or Passport authentication
- Testing Eloquent models, relationships, scopes, and accessors
- Setting up testing infrastructure for Laravel projects
- Writing feature tests for HTTP controllers and form requests
- Mocking external services (queues, mail, notifications, HTTP)
TDD Workflow for Laravel
Red-Green-Refactor Cycle
// Step 1: RED — Write a failing test
public function test_a_product_can_be_created(): void
{
$product = Product::factory()->create(['name' => 'Test Product']);
$this->assertDatabaseHas('products', ['name' => 'Test Product']);
}
// Step 2: GREEN — Write the migration, model, and factory
// Step 3: REFACTOR — Improve while keeping tests green
Setup
PHPUnit Configuration
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Testing & QA, PHP & Laravel
- First seen
- Jul 14, 2026
Questions
What does the laravel-tdd skill help with?
The laravel-tdd skill guides test-driven development for Laravel applications using PHPUnit and Pest. It covers model factories, HTTP and JSON API feature tests, Sanctum authentication testing, mocking external services, and coverage.
Which Claude Marketplaces category is laravel-tdd in, and what sets it apart?
laravel-tdd sits in the Testing & QA category and ranks in the top 50 there, alongside skills such as tdd and webapp-testing. Its focus is Laravel specifically, with PHPUnit and Pest test setup, factories, and Sanctum authentication tests.
How do I install the laravel-tdd skill?
Run npx -y skills add affaan-m/ecc --skill laravel-tdd -y in your project. Once installed, the agent can write Laravel tests with PHPUnit or Pest and drive a Laravel feature test-first.
Does laravel-tdd test API endpoints that use Sanctum?
Yes, the skill covers implementing API endpoints with Sanctum or Passport authentication and includes JSON API testing examples. It also shows how to mock queues, mail, notifications, and HTTP calls in Laravel tests.
More from affaan-m/ecc
All 257- Agentic Engineering12.8K
- Clickhouse Io12.7K
- Cost Aware Llm Pipeline12.7K
- Kotlin Patterns12.7K
- Iterative Retrieval12.6K
- Django Verification12.6K
- Nextjs Turbopack12.6K
- Content Engine12.5K
- Springboot Verification12.5K
- Context Budget12.5K
- Nutrient Document Processing12.5K
- Autonomous Loops12.4K
- Architecture Decision Records12.4K
- Investor Materials12.4K
- Swiftui Patterns12.4K
- Pytorch Patterns12.3K
- Bun Runtime12.3K
- Ai First Engineering12.3K
- Flutter Dart Code Review12.2K
- Perl Security12.2K
- Regex Vs Llm Structured Text12.2K
- Compose Multiplatform Patterns12.2K
- Continuous Agent Loop12.2K
- Content Hash Cache Pattern12.1K
Similar to Laravel Tdd
More Testing & QAdjango-tddSkillaffaan-m/ecc13.3K installsPytest-django test setup, factory_boy fixtures, and TDD workflow for Django and DRF apps.
laravel-verificationSkillaffaan-m/ecc11.4K installsVerification loop for Laravel projects that runs env, lint, static analysis, tests, and security gates in order.
laravel-specialistSkilljeffallan/claude-skills24.3K installsBuild and configure Laravel 10+ apps with Eloquent, Sanctum, Horizon, API resources, and Livewire.
pest-testingSkillspatie/freek.dev751 installsPest 4 test-writing guide covering unit, feature, and browser tests with assertions, datasets, and mocking.
test-specialistPluginmwguerra/claude-code-plugins35 starsProactive Pest 4 testing for PHP, Laravel, Livewire, and Filament apps. Auto-generates tests for models, controllers, policies, and Livewire components. Analyze
nestjs-testing-expertSkillshipshitdev/library623 installsTest-strategy guide for NestJS modules, providers, controllers, and HTTP endpoints using Vitest.