laravel-tdd

Automate Laravel testing with PHPUnit and Pest frameworks.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/hector-manny/bussbot --skill laravel-tdd-hector-manny
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-tdd
Source: https://github.com/hector-manny/bussbot/tree/main/.cursor/skills/laravel-tdd
Command: npx skills add https://github.com/hector-manny/bussbot --skill laravel-tdd-hector-manny

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires phpunit, pest, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Streamline and enhance the testing of Laravel applications with targeted strategies and tools, fostering confidence and speed in quality assurance processes.

Core Features & Use Cases

  • ** PHPUnit Integration**: Facilitate the creation of PHPUnit and Pest tests for Laravel applications.
  • Testing Strategies: Employ best practices for Test-Driven Development, including red-green-refactoring cycles.
  • Model Testing: Automate the creation and validation of models, relationships, and scopes using factories.
  • Feature / HTTP Testing: Build and assert API functionality, authentication, and controller operations with precision.
  • JSON API and Sanctum API Auth Testing: Verify API endpoints and secure authentication mechanisms.
  • Mocking and Fakes: Safeguard code robustness with reliable mock objects and fakes for HTTP, Mail, Notifications, and Queues.
  • Event, Storage, and Queue Testing: Simulate complex workflows by mocking events, file storage, and queued tasks.

Quick Start

Implement Laravel testing strategies by creating a new PHPUnit test case for the "createProduct" feature using TDD methodology.

Frequently Asked Questions about laravel-tdd

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

FAQPage Schema
How do I automate Laravel testing using PHPUnit and Pest?

Automate Laravel testing by generating PHPUnit and Pest test cases for models, controllers, and HTTP API endpoints. The framework provides mock capabilities and error handling to validate authentication, Sanctum APIs, and queued tasks.

What's the best way to test Laravel model relationships and scopes?

Test Laravel model relationships and scopes by automating creation and validation using model factories. This approach ensures robust data integrity verification within your Test-Driven Development workflow.

Does this Laravel testing approach support mocking events, storage, and queues?

Yes, Laravel testing supports mocking events, file storage, and queued tasks. You can simulate complex workflows by utilizing reliable mock objects and fakes for HTTP, Mail, and Notifications.

How do I test JSON API endpoints and Sanctum authentication in Laravel?

Test JSON API endpoints and Sanctum authentication by building and asserting API functionality and controller operations with precision. This verifies secure authentication mechanisms within your HTTP testing strategies.

Do I need Composer to set up PHPUnit and Pest for Laravel TDD?

Yes, you need Composer to manage dependencies and set up PHPUnit and Pest testing libraries. A PHP environment with Laravel installed is required to execute Test-Driven Development strategies effectively.