function ModuleUnitTest::testModuleInvokeAll
Test that module_invoke_all() can load a hook defined in hook_hook_info().
File
-
modules/
simpletest/ tests/ module.test, line 159
Class
- ModuleUnitTest
- Unit tests for the module API.
Code
function testModuleInvokeAll() {
module_enable(array(
'module_test',
), FALSE);
$this->resetAll();
$this->drupalGet('module-test/hook-dynamic-loading-invoke-all');
$this->assertText('success!', 'module_invoke_all() dynamically loads a hook defined in hook_hook_info().');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.