drupal-testing-companion

Guide PHPUnit, Kernel, and Functional testing for Drupal modules.

Updated Jan 14, 2026
One-click install
npx skills add https://github.com/proofoftom/waap-drupal --skill drupal-testing-companion
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drupal-testing-companion
Source: https://github.com/proofoftom/waap-drupal/tree/main/.claude/skills/drupal-testing-companion
Command: npx skills add https://github.com/proofoftom/waap-drupal --skill drupal-testing-companion

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides expert guidance for thoroughly testing Drupal modules, including PHPUnit setup, Kernel and Functional tests, and crypto testing patterns, to improve reliability and security.

Core Features & Use Cases

  • Comprehensive test strategy: Kernel tests for services and database interactions, and Functional tests for routes, forms, and REST APIs.
  • Crypto and authentication testing: Patterns for signature verification, nonce handling, and wallet-based authentication flows.
  • Code quality and coverage: Guidance on generating and interpreting code coverage to drive test improvements.

Quick Start

Run through the setup steps to begin testing your Drupal module: install PHPUnit, configure Drupal tests, and start with a basic Kernel test scaffold.

Frequently Asked Questions about drupal-testing-companion

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

FAQPage Schema
How do I set up PHPUnit for Drupal module testing?

Drupal module testing with PHPUnit involves configuring KernelTestBase and BrowserTestBase to validate services, routes, forms, and REST APIs for production-ready coverage.

When should I use Kernel tests versus Functional tests in Drupal?

Use Drupal Kernel tests for services and database interactions, and use Functional tests when validating routes, forms, and REST APIs to ensure comprehensive module coverage.

How do I test authentication flows and signature verification in Drupal?

Drupal authentication testing uses specific patterns for signature verification, nonce handling, and wallet-based authentication flows to ensure module security and reliability.

Can I measure code coverage for Drupal modules using PHPUnit?

Yes, you can generate and interpret code coverage reports for Drupal modules to identify untested paths and drive test improvements for production-ready reliability.

Does this Drupal testing approach work for admin interfaces and REST APIs?

Yes, Drupal functional tests using BrowserTestBase specifically cover admin interfaces, routes, forms, and REST APIs to validate end-to-end module behavior.