drupal-testing

Community

Write robust Drupal PHPUnit tests.

Authorproofoftom
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps developers write effective and correct automated tests for Drupal modules, ensuring code quality and preventing regressions.

Core Features & Use Cases

  • Test Type Selection: Guides you to choose the most appropriate PHPUnit test type (Unit, Kernel, Functional, FunctionalJavascript) based on the code being tested.
  • Correct Setup: Demonstrates the essential setUp() patterns, module declarations ($modules), and annotations (@group) required for tests to run correctly.
  • Use Case: You've built a new content entity type and want to ensure its CRUD operations work as expected. This Skill will help you write a Kernel test to verify entity saving, loading, and deletion without needing a full browser.

Quick Start

Write a kernel test for the my_module module to verify its service.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: drupal-testing
Download link: https://github.com/proofoftom/drupal-skills/archive/main.zip#drupal-testing

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.