laravel-testing

Create Laravel 13 feature and unit tests with Pest PHP 4 or PHPUnit 12.

Updated May 11, 2026
One-click install
npx skills add https://github.com/irizqi/agent-skills --skill laravel-testing-irizqi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-testing
Source: https://github.com/irizqi/agent-skills/tree/main/skills/laravel-test
Command: npx skills add https://github.com/irizqi/agent-skills --skill laravel-testing-irizqi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves inconsistencies and inefficiencies in Laravel testing by providing a unified, framework-aware guide for writing high-quality feature and unit tests.

Core Features & Use Cases

  • Framework Detection: Automatically identifies whether to use Pest PHP or PHPUnit syntax based on project configuration.
  • Standardized Patterns: Provides best-practice templates for HTTP tests, model factories, database assertions, and service faking.
  • Use Case: When tasked with writing a new feature test for an API endpoint, use this Skill to ensure the test structure, database refreshing, and authentication mocking follow the latest Laravel 13 standards.

Quick Start

Ask the AI to generate a feature test for the current controller using the detected testing framework and the standard Arrange-Act-Assert pattern.

Frequently Asked Questions about laravel-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write feature tests for Laravel 13 APIs using Pest or PHPUnit?

Laravel 13 testing detects your configured framework automatically to provide syntax-specific patterns. It standardizes feature and unit test creation by guiding HTTP requests, model factories, database assertions, and service faking according to framework conventions.

What's the best way to structure Laravel testing workflows with model factories and database assertions?

Standardizing Laravel testing workflows involves using best-practice templates for model factories and database assertions. This ensures feature and unit tests follow framework-specific syntax patterns and Laravel 13 conventions for reliable execution.

Does this Laravel testing approach support both Pest PHP and PHPUnit?

Yes, Laravel 13 testing supports both Pest PHP 4 and PHPUnit 12 through automatic framework detection. It identifies your project configuration to apply the correct syntax patterns for HTTP tests, database assertions, and service faking.

How do I fake services and mock authentication in Laravel 13 tests?

Faking services and mocking authentication in Laravel 13 tests requires applying standardized framework-aware patterns. This ensures service faking and authentication mocking follow the latest conventions for reliable feature test execution.