pest-testing

Create, execute, and debug PHP tests with the Pest framework.

Updated Jun 19, 2023
One-click install
npx skills add https://github.com/JeroenJochems/modelwise --skill pest-testing-jeroenjochems
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pest-testing
Source: https://github.com/JeroenJochems/modelwise/tree/main/.claude/skills/pest-testing
Command: npx skills add https://github.com/JeroenJochems/modelwise --skill pest-testing-jeroenjochems

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of writing, running, and debugging tests for PHP applications using the Pest testing framework, ensuring code quality and reliability.

Core Features & Use Cases

  • Test Creation: Generate unit, feature, and browser tests with php artisan make:test --pest.
  • Assertion Library: Utilize specific and expressive assertions for clearer test outcomes.
  • Browser Testing: Conduct full integration tests in real browsers.
  • Use Case: When developing a new feature, use this Skill to create comprehensive unit and feature tests, ensuring the new code integrates seamlessly and behaves as expected.

Quick Start

Use the pest-testing skill to create a new feature test named 'User can login'.

Frequently Asked Questions about pest-testing

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

FAQPage Schema
How do I write and run PHP Pest tests for a Laravel application?

To write and run PHP Pest tests, you generate tests using Laravel Artisan commands and execute them to verify code behavior. This framework supports unit, feature, and browser tests using expressive assertions.

Can I use Pest for browser and architecture testing in PHP?

Yes, Pest supports browser and architecture testing alongside standard unit and feature tests. You can conduct full integration tests in real browsers and validate structural application rules.

What is the best way to generate a feature test using Pest in Laravel?

The best way to generate a feature test is using the Artisan command 'php artisan make:test --pest'. This creates the test file pre-configured for the Pest testing framework.

Does Pest testing work with Laravel Artisan for test generation and execution?

Yes, Pest testing integrates directly with Laravel Artisan for both test generation and execution. This integration streamlines creating test files and running them to debug PHP applications.

How do I debug PHP applications using Pest assertions?

You debug PHP applications by leveraging Pest's expressive assertion library to write specific test outcomes. Running these tests highlights integration failures and unexpected behavior.

Why use Pest over other PHP testing frameworks for TDD?

Pest provides an expressive assertion syntax that simplifies test creation and debugging for TDD workflows. It integrates with Laravel Artisan to generate unit, feature, and browser tests.