test-validator

Analyze CakePHP test files for documentation annotations and prohibited patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill validates PHP test files for CakePHP projects, enforcing production-focused testing practices and suppressing common anti-patterns that undermine test reliability.

Core Features & Use Cases

  • Documentation & annotations validation: Ensures tests include required PHPDoc annotations such as @covers and @group and that test names reflect their purpose.
  • Configuration usage enforcement: Promotes using Configure::read() for production-style configuration lookups and flags usage of Configure::write().
  • Prohibited pattern detection: Detects risky patterns like conditional assertions, existence checks, and shallow assertions that skip real behavior verification.
  • Production code alignment: Verifies tests target existing controllers, routes, and actions and that test coverage aligns with production code.

Quick Start

Use this skill to audit CakePHP tests in your project and enforce deterministic, production-grade validation.

Frequently Asked Questions about test-validator

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

FAQPage Schema
How do I enforce strict validation rules for CakePHP unit and integration tests?

CakePHP test validation is enforced by analyzing PHP test files against project-specific rules defined in tests/README.md and loading constraints from .claude/config.yaml to detect anti-patterns and ensure production-focused testing practices.

What anti-patterns are detected when validating PHP tests for CakePHP projects?

PHP test validation detects conditional assertions, existence checks, and shallow assertions that skip real behavior verification, while also flagging prohibited Configure::write() usage and ensuring tests align with production controllers, routes, and actions.

Does CakePHP test validation support both version 4.x and 5.x?

CakePHP test validation applies to both CakePHP 4.x and 5.x unit and integration tests, verifying required PHPDoc annotations like @covers and @group while enforcing proper Configure::read() usage for production-style configuration lookups.

How do I check that my CakePHP test names and annotations meet quality standards?

Test name and annotation quality is checked by validating that test names reflect their purpose and that required PHPDoc annotations such as @covers and @group are present and correctly documented across all PHP test files.

Why should I avoid Configure::write() in CakePHP test files?

Configure::write() is flagged during PHP test validation because production-focused testing promotes using Configure::read() for configuration lookups instead, ensuring tests reflect deterministic production behavior rather than mutating state at runtime.