iqual/reusable-drupal-tests

There is no license information available for the latest version (1.x-dev) of this package.

A tiny framework for writing Drupal test classes in a decoupled way from the PHPUnit/Drupal framework so that they can be reused in different contexts.

1.x-dev 2022-10-14 08:15 UTC

This package is auto-updated.

Last update: 2024-05-14 11:30:12 UTC


README

Introduction

This tiny framework is meant to allow Drupal test authors to "decouple" their Kernel test classes from the PHPUnit/Drupal test framework(s).

This framework came into existence in order to support the following idea:

  1. Write a Kernel test class following a loose coupling approach as far as the configuration and instantiation of the Drupal testing instance goes.
  2. Use the Kernel test class in the context of either a vanilla Drupal instance (classic Drupal testing approach) or against an already functioning Drupal instance (skipping the ::setUp() method).

Installation

  • Install via Composer: composer require iqual/reusable-drupal-tests --dev.

Updating existing Drupal tests into reusable Drupal tests

Using together with Drupal Test Traits