laravel-testing

Test Laravel applications with Pest for unit, feature, and architectural scenarios.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/Jorge-Ivan/uam-hogar-nazareth-web --skill laravel-testing-jorge-ivan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-testing
Source: https://github.com/Jorge-Ivan/uam-hogar-nazareth-web/tree/main/.claude/skills/laravel-testing
Command: npx skills add https://github.com/Jorge-Ivan/uam-hogar-nazareth-web --skill laravel-testing-jorge-ivan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers developers to write robust, efficient, and maintainable tests for their Laravel applications, ensuring code quality and reducing bugs.

Core Features & Use Cases

  • Comprehensive Testing: Supports feature, unit, and architectural testing.
  • Pest Framework: Leverages the modern Pest testing framework for a clean syntax.
  • Database & HTTP Testing: Includes tools for testing database interactions and HTTP endpoints.
  • Mocking & Fakes: Facilitates mocking external services and faking components like Mail and Queue.
  • Use Case: When developing a new API endpoint, use this Skill to write feature tests that cover request validation, data persistence, and response structure, ensuring the endpoint functions correctly under various conditions.

Quick Start

Use the laravel-testing skill to write a feature test for the /api/users endpoint.

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 a Laravel API endpoint?

Feature tests for a Laravel API endpoint validate request inputs, data persistence, and response structures. Using the Pest framework, you simulate HTTP requests to ensure endpoints function correctly under various conditions.

What is the best way to test database interactions in Laravel?

Testing database interactions in Laravel is handled through integrated testing tools that assert data persistence. The Pest framework provides a clean syntax to efficiently validate your application's database operations during unit and feature tests.

Can I use Pest for architectural testing in Laravel applications?

Pest supports architectural testing in Laravel applications to enforce structural constraints and best practices. This ensures your application logic and architecture remain maintainable and adhere to designated testing standards across the codebase.

How do I mock external services and fake components during Laravel testing?

Mocking external services and faking Laravel components like Mail and Queue isolates your tests from external side effects. The Pest framework facilitates this mocking to ensure efficient and accurate validation of application logic.

Does this Pest testing approach support both unit and feature tests?

Pest provides comprehensive support for both unit and feature tests within Laravel. This allows you to validate isolated application logic and broader HTTP request lifecycles using a single, clean syntax framework.