Posted by NancyDru on June 30, 2009 at 5:33pm
Jump to:
| Project: | SimpleTest |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
I have a small bit of code to check for any "include" that might be needed. This is at the beginning of the module before any "function" statements. In normal mode, thsi code is executing correctly and the needed include statements are being executed. Under Simpletest, it appears that they are not being honored. Is this something that is known or maybe a bug?
Comments
#1
I also tried this code and weblinks.weight.inc is not getting included under Simpletest.
function weblinks_init() {
if (module_exists('token')) {
include_once(drupal_get_path('module', 'weblinks') .'/token_weblinks.inc');
}
if (!module_exists('weight')) {
include_once(drupal_get_path('module', 'weblinks') .'/weblinks.weight.inc');
}
}
I would mark this critical, but the site is not down, I just can't run this test.
#2
I'll bet money that the original issue behind this is #360925: Need to reset module_list() since module_exists and module_list get all kinds of messed up during testing.
#3
/me bets as well.
#4
Please see, #472684: Install non-default modules one at a time to ensure proper module list is maintained during installation hooks, for patch.