> php-testing
Unit and integration testing standards for PHP applications. Use when writing PHPUnit unit tests or integration tests for PHP applications. (triggers: tests/**/*.php, phpunit.xml, phpunit, pest, mock, assert, tdd)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/php-testing?format=md"PHP Testing
Priority: P1 (HIGH)
Structure
tests/
├── Unit/
├── Integration/
└── Feature/
Implementation Guidelines
- Pest/PHPUnit: Use Pest for DX or PHPUnit for legacy parity.
- TDD Flow: Follow Red-Green-Refactor cycle for new logic.
- Isolation: Mock dependencies via Mockery or PHPUnit mocks.
- Strict Assertions: Favor
assertSameoverassertTrue. - Data Providers: Run tests against multiple sets via
@dataProvider. - Categorize: Separate Unit (isolated) from Integration (DB/API).
Anti-Patterns
- Testing Private: No Private Testing: Validate public behavior only.
- Over-Mocking: No Brittle Mocks: Mock system boundaries only.
- Blocking Tests: No Networking: Use in-memory DBs and mocks.
- Metric Chasing: No 100% Mania: Prioritize quality over coverage.
References
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)