function ModuleUnitTest::testModuleInvoke

7.x module.test ModuleUnitTest::testModuleInvoke()

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

File

drupal-7.x/modules/simpletest/tests/module.test, line 116
Tests for the module API.

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().');
}