Drupal Test

Destructive Tests

Prevent certain test(s) from running against production.

In some cases, certain tests should not be allowed to run against certain base URLs. For example, you should not let end to end tests that modify the database run against production. These types of tests are called here as destructive.

Prevent Entire Test Class

Prevent Single Test Methods

Define Which URLs Are "Production"

How It Works

A test class must use \AKlump\DrupalTest\Utilities\DestructiveTrait if you want to use this convention. The base classes: \AKlump\DrupalTest\ClientTestCase and \AKlump\DrupalTest\EndToEndTestCase already include this trait so you need only include the annotation as shown above.