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::testModuleInvoke

Test that module_invoke() can load a hook defined in hook_hook_info().

File

modules/simpletest/tests/module.test, line 157

Class

ModuleUnitTest
Unit tests for the module API.

Code

function testModuleInvoke() {
 module_enable (array(
 'module_test',
 ), FALSE);
 $this->resetAll ();
 $this->drupalGet ('module-test/hook-dynamic-loading-invoke');
 $this->assertText ('success!', 'module_invoke() 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.