php-testing

Installation
SKILL.md

PHP Testing

Priority: P1 (HIGH)

Structure

See implementation examples for test directory layout.

Write Tests with PHPUnit and Pest

  • Standards: Use PHPUnit (9/10+) or Pest. Organize into Unit/, Integration/, and Feature/. Class names should extend TestCase.
  • TDD Workflow: Follow Red-Green-Refactor. Write failing test first, implement minimal logic, then refactor.

See implementation examples for PHPUnit service test with mock.

Apply Assertions and Data Providers

  • Fluent Assertions: Use assertSame (===) over assertEquals to avoid type coercion. Also use assertCount() and assertMatchesRegularExpression().
  • Data Providers: Use #[DataProvider('statusProvider')] (PHPUnit 10+) or dataset (Pest).
Installs
1
GitHub Stars
521
First Seen
12 days ago
php-testing — hoangnguyen0403/agent-skills-standard