DrupalTestCase::$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.
Type: setup
File
-
modules/
simpletest/ drupal_web_test_case.php, line 132
Class
- DrupalTestCase
- Base class for Drupal tests.
Code
protected $setup = FALSE;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.