drupal-kernel

Installation
SKILL.md

Drupal Kernel Tests

When to Use

  • Testing services that interact with Drupal's service container
  • Database operations and entity CRUD
  • Hook implementations
  • Config operations
  • Tests needing a real database but not a full browser

Basic Structure

// tests/src/Kernel/MyServiceTest.php
namespace Drupal\Tests\my_module\Kernel;

use Drupal\KernelTests\KernelTestBase;
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
Installs
51
GitHub Stars
73
First Seen
Apr 17, 2026