protected property TestBase::$setup

Flag to indicate whether the test has been set up.

The setUp() method isolates the test from the parent Drupal site by creating a random prefix for the database and setting up a clean file storage directory. The tearDown() method then cleans up this test environment. We must ensure that setUp() has been run. Otherwise, tearDown() will act on the parent Drupal site rather than the test environment, destroying live data.

File

drupal/core/modules/simpletest/lib/Drupal/simpletest/TestBase.php, line 90
Definition of Drupal\simpletest\TestBase.

Class

TestBase
Base class for Drupal tests.

Namespace

Drupal\simpletest

Code

protected $setup = FALSE;