skills/php/php-testing/SKILL.md
Write unit and integration tests for PHP applications with PHPUnit and Pest. Use when writing PHPUnit unit tests or integration tests for PHP applications.
npx skillsauth add hoangnguyen0403/agent-skills-standard php-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
See implementation examples for test directory layout.
PHPUnit (9/10+) or Pest. Organize into Unit/, Integration/, and Feature/. Class names should extend TestCase.See implementation examples for PHPUnit service test with mock.
assertSame (===) over assertEquals to avoid type coercion. Also use assertCount() and assertMatchesRegularExpression().#[DataProvider('statusProvider')] (PHPUnit 10+) or dataset (Pest).See implementation examples for Pest expressive syntax with datasets.
createMock() for dependencies. NOT mock simple Data Objects.Transactions or SQLite :memory:.80%+ line coverage. Use phpunit.xml to whitelist specific directories.development
Summarizes GitHub PR, GitLab MR, or Azure DevOps PR metadata, review threads, changed files, and template completeness. Use during review-ticket or code-review workflows when PR/MR context exists.
tools
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling.
development
Validate input, secure auth tokens, and prevent injection attacks in TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration.
development
Apply modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings.