diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-11-27 20:41:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-11-27 20:41:38 +0000 |
commit | 62bb48c4efc1600269d76923e437c5854c08502e (patch) | |
tree | 71365a81d1fb42a4596ebe8f80b41b86ae228782 /modules/simpletest/tests/module.test | |
parent | d7a63ff98814c19108808624b957c6335c58caa5 (diff) | |
download | brdo-62bb48c4efc1600269d76923e437c5854c08502e.tar.gz brdo-62bb48c4efc1600269d76923e437c5854c08502e.tar.bz2 |
- Patch #752226 by sun, carlos8f, JohnAlbin, chx: module_invoke() doesn't work with hooks placed in include files via hook_hook_info().
Diffstat (limited to 'modules/simpletest/tests/module.test')
-rw-r--r-- | modules/simpletest/tests/module.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/simpletest/tests/module.test b/modules/simpletest/tests/module.test index d3e3dbf1b..711a739ab 100644 --- a/modules/simpletest/tests/module.test +++ b/modules/simpletest/tests/module.test @@ -112,6 +112,26 @@ class ModuleUnitTest extends DrupalWebTestCase { } /** + * Test that module_invoke() can load a hook defined in hook_hook_info(). + */ + function testModuleInvoke() { + module_enable(array('module_test'), FALSE); + $this->resetAll(); + $this->drupalGet('module-test/hook-dynamic-loading-invoke'); + $this->assertText('success!', t('module_invoke() dynamically loads a hook defined in hook_hook_info().')); + } + + /** + * Test that module_invoke_all() can load a hook defined in hook_hook_info(). + */ + function testModuleInvokeAll() { + module_enable(array('module_test'), FALSE); + $this->resetAll(); + $this->drupalGet('module-test/hook-dynamic-loading-invoke-all'); + $this->assertText('success!', t('module_invoke_all() dynamically loads a hook defined in hook_hook_info().')); + } + + /** * Test dependency resolution. */ function testDependencyResolution() { |