Test Infrastructure

Provide 46 reusable test helper methods across 5 traits and 2 base test cases.

1|Updated May 28, 2025
One-click install
npx skills add https://github.com/hackur/web-standards-playground-showcase --skill test-infrastructure-hackur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Test Infrastructure
Source: https://github.com/hackur/web-standards-playground-showcase/tree/main/.claude-laravel-backup/skills/test-infrastructure
Command: npx skills add https://github.com/hackur/web-standards-playground-showcase --skill test-infrastructure-hackur

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reusable test traits, base test cases, and 46 helper methods from tests/Support/ for efficient test authoring.

Core Features & Use Cases

  • 46 reusable methods across 5 traits and 2 base test cases
  • Quick-start helpers for unit, feature, and browser tests
  • Clear organization of test utilities (CreatesUsers, CreatesSubmissions, etc.)

Quick Start

Run unit tests quickly with:

  • Unit tests: ./scripts/dev.sh test
  • Feature tests: ./vendor/bin/sail artisan test --testsuite=Feature

Frequently Asked Questions about Test Infrastructure

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

FAQPage Schema
How do I speed up Laravel test writing with reusable helpers?

Test Infrastructure provides 46 reusable helper methods across 5 traits and 2 base test cases to standardize and accelerate test authoring. Use traits like CreatesUsers and CreatesSubmissions to build unit, feature, and browser tests faster without duplicating setup logic.

Can I use PHPUnit traits to reduce boilerplate in Laravel tests?

Yes. Test Infrastructure exposes organized trait-based utilities under tests/Support that encapsulate common test operations—user creation, submission handling, state management, and assertions—so each test file inherits reusable methods instead of repeating setup code.

What's included in Laravel test infrastructure templates?

Test Infrastructure includes 46 helper methods distributed across 5 traits and 2 base test cases for unit, feature, and browser testing. Components handle user creation, submissions, cards, states, and custom assertions, all located in tests/Support for immediate inheritance.

How do I run Laravel unit, feature, and browser tests quickly?

Test Infrastructure provides quick-start commands: run unit tests with ./scripts/dev.sh test or feature tests with ./vendor/bin/sail artisan test --testsuite=Feature. Base test cases and traits eliminate repetitive configuration, letting you focus on test logic.

Does Laravel Dusk work with shared test traits?

Yes. Test Infrastructure supports browser testing via Laravel Dusk and organizes reusable Dusk utilities alongside unit and feature test helpers in tests/Support, allowing consistent test patterns across all three testing types.

What's the difference between unit and feature test helpers in Laravel?

Test Infrastructure provides separate base test cases and traits optimized for each type: unit tests focus on isolated logic validation, feature tests verify full request flows, and both inherit shared utilities like user and submission creation from a unified tests/Support structure.