phpunit-basics

Installation
SKILL.md

PHPUnit Testing Basics

When to use

  • The user wants a PHPUnit test to assert code throws an exception using expectException on PHP 8.1+.
  • The user wants to run the same PHPUnit test body over multiple input rows via a data provider on PHP 8.1+.
  • The user wants to build a fresh fixture before each PHPUnit test and tear it down afterward on PHP 8.1+.
  • The user wants to write a test that extends TestCase and asserts behavior with PHPUnit on PHP 8.1+.

When NOT to use

  • Do not use this skill for browser-driven or end-to-end UI testing that needs a headless browser harness.
  • Do not use this skill when the project has standardized on Pest's function-style tests and expectation API.

Core guidance

Installs
1
GitHub Stars
3
First Seen
Jul 3, 2026
phpunit-basics — anyorgname/php-skills