Error message
You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).function ModuleUnitTest::testSystemModulesBrokenConfigure
Test system_modules() with a module with a broken configure path.
File
-
modules/
simpletest/ tests/ module.test, line 144
Class
- ModuleUnitTest
- Unit tests for the module API.
Code
function testSystemModulesBrokenConfigure() {
module_enable (array(
'system_admin_test',
));
$this->resetAll ();
$admin = $this->drupalCreateUser (array(
'administer modules',
));
$this->drupalLogin ($admin);
$this->drupalGet ('admin/modules');
$module_log = db_query_range ('SELECT message FROM {watchdog} WHERE type = :type ORDER BY wid DESC', 0, 1, array(
':type' => 'system',
))->fetchField ();
$this->assertEqual ('Module %module specifies an invalid path for configuration: %configure', $module_log, 'An error was logged for the module\'s broken configure path.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.