public function AdminMenuWebTestCase::setUp in Administration menu 7.3
Same name and namespace in other branches
- 6.3 tests/admin_menu.test \AdminMenuWebTestCase::setUp()
Sets up a Drupal site for running functional and integration tests.
Generates a random database prefix and installs Drupal with the specified installation profile in DrupalWebTestCase::$profile into the prefixed database. Afterwards, installs any additional modules specified by the test.
After installation all caches are flushed and several configuration values are reset to the values of the parent site executing the test, since the default values may be incompatible with the environment in which tests are being executed.
Parameters
...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.
Overrides DrupalWebTestCase::setUp
See also
DrupalWebTestCase::prepareDatabasePrefix()
DrupalWebTestCase::changeDatabasePrefix()
DrupalWebTestCase::prepareEnvironment()
4 calls to AdminMenuWebTestCase::setUp()
- AdminMenuCustomizedTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
- AdminMenuDynamicLinksTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
- AdminMenuLinkTypesTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
- AdminMenuPermissionsTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
4 methods override AdminMenuWebTestCase::setUp()
- AdminMenuCustomizedTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
- AdminMenuDynamicLinksTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
- AdminMenuLinkTypesTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
- AdminMenuPermissionsTestCase::setUp in tests/
admin_menu.test - Sets up a Drupal site for running functional and integration tests.
File
- tests/
admin_menu.test, line 22 - Tests for the Administration menu module.
Class
- AdminMenuWebTestCase
- Base class for all administration menu web test cases.
Code
public function setUp() {
// Enable admin menu module and any other modules.
$modules = func_get_args();
$modules = isset($modules[0]) ? $modules[0] : $modules;
$modules[] = 'admin_menu';
parent::setUp($modules);
// Disable client-side caching.
variable_set('admin_menu_cache_client', FALSE);
// Disable Clean URLs to ensure drupal.org testbot compatibility.
variable_set('clean_url', 0);
}