Open code not executing

NancyDru - June 30, 2009 - 17:33
Project:SimpleTest
Version:6.x-2.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

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?

#1

NancyDru - June 30, 2009 - 18:40

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

Dave Reid - June 30, 2009 - 18:44

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

boombatower - July 9, 2009 - 18:36
Status:active» duplicate

/me bets as well.

 
 

Drupal is a registered trademark of Dries Buytaert.