testing-standards

Standardize PHPUnit testing conventions for PHP projects.

2|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/masanao-ohba/claude-manifests --skill testing-standards-masanao-ohba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-standards
Source: https://github.com/masanao-ohba/claude-manifests/tree/main/skills/php/testing-standards
Command: npx skills add https://github.com/masanao-ohba/claude-manifests --skill testing-standards-masanao-ohba

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PHP projects often struggle with inconsistent tests, unclear conventions, and maintenance overhead. This Skill standardizes PHPUnit testing conventions to help teams write reliable, readable, and maintainable tests across projects.

Core Features & Use Cases

  • Structured guidelines for test naming, class organization, and file layout.
  • AAA pattern and Given-When-Then patterns to improve readability and test reliability.
  • Data providers, mocks, and stubs guidance to build robust, reusable tests across services.
  • Test organization and documentation practices to improve traceability and coverage awareness.

Quick Start

  • Install PHP and Composer in your environment.
  • Add PHPUnit to your project with Composer: composer require --dev phpunit/phpunit ^9
  • Create a sample test following the conventions described in this Skill (class named SomethingTest, extending TestCase, with clear setup and tests)
  • Run tests using vendor/bin/phpunit (or phpunit if installed globally) and adjust as needed.

Frequently Asked Questions about testing-standards

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

FAQPage Schema
How do I standardize PHPUnit testing conventions across my PHP projects?

Standardize PHPUnit testing conventions by enforcing structured patterns like AAA and Given-When-Then, clear test naming, and organized class file layouts to improve test reliability and maintainability across PHP projects.

What is the best way to structure data providers and mocks in PHPUnit tests?

The best way to structure data providers and mocks in PHPUnit tests is to follow standardized stub patterns and reusable data provider conventions, ensuring robust and maintainable test coverage across services.

How do I organize unit, integration, and functional tests in a PHP project?

Organize unit, integration, and functional tests in a PHP project by applying standardized test organization practices, clear coverage annotations, and structured documentation to improve traceability and coverage awareness.

What testing patterns should I use to improve PHPUnit test readability?

To improve PHPUnit test readability, use the AAA (Arrange-Act-Assert) pattern and the Given-When-Then pattern, which provide structured and clear test execution flows for reliable test suites.

Do I need Composer and PHPUnit installed to apply these test standards?

Yes, you need Composer and PHPUnit installed in your environment to apply these test standards, which involves adding PHPUnit via Composer and running tests using the vendor/bin/phpunit command.