abderrahimghazali/drupal-boost/quality-testing
Claude Code and agent skill by abderrahimghazali/drupal-boost
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Drupal code quality and testing with PHPStan, Drupal Check, PHP CodeSniffer (Drupal coding standards), PHPUnit (unit/kernel/functional/browser tests), Nightwatch.js, and Rector. Use when writing tests, checking code quality, or setting up CI quality gates.
Install
npx vskill@latest install abderrahimghazali/drupal-boost/quality-testingSKILL.md
The same SKILL.md was published earlier as abderrahimghazali/drupal-boost/quality-testing.
Drupal Quality & Testing
PHPUnit Test Types
Unit Tests
- Location:
tests/src/Unit/ - Extend:
Drupal\Tests\UnitTestCase - No Drupal bootstrap, no database
- Mock all dependencies with
$this->createMock()or Prophecy
Kernel Tests
- Location:
tests/src/Kernel/ - Extend:
Drupal\KernelTests\KernelTestBase - Minimal bootstrap with database and services
Functional Tests
- Location:
tests/src/Functional/ - Extend:
Drupal\Tests\BrowserTestBase - Full Drupal install, simulated browser
Running Tests
PHPStan
phpstan.neon configuration
PHP CodeSniffer
Rector (Automated Deprecation Fixes)
Key Rules
- Write Unit tests for pure logic, Kernel tests for service integration, Functional tests for user-facing behavior
- Always set
protected $defaultTheme = 'stark';in Functional tests - Always declare
$modulesarray with ALL required modules - Install entity schemas and config in
setUp()for Kernel tests - Use
->accessCheck(TRUE)in test entity queries too - Run PHPCS and PHPStan in CI — fail the build on violations
- Use PHPStan baseline to avoid blocking on legacy issues
Read reference files for details:
reference/phpunit-patterns.mdfor test patternsreference/phpstan-config.mdfor PHPStan setupreference/rector-rules.mdfor Rector configuration
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/quality-testing/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/abderrahimghazali/drupal-boost/quality-testing)