class TestIncCase extends DrupalTestCase {
function get_info() {
return array(
'name' => t('Simpletest does not include .inc files'),
'desc' => t(''),
'group' => t('Simpletest'),
);
}
function testModuleEnable() {
$this->assertTrue(function_exists('user_admin'), 'Check function user_admin()');
}
}
It's fails because user_admin() located in user.admin.inc file.
drupal_load() includes only .module file, no .inc.
.inc loads on demand by the meny system AFAICS.
Maybe it's good to run around the menu and get all files.
Comments
Comment #1
vladimir.dolgopolov commentedmodule_load_include() could helps but we should know files' names.
So it's better to explore a filesystem itself, imho.
Comment #2
vladimir.dolgopolov commentedThere is no needs to #1, there is no bug.
module_load_include() and module_load_all_includes() work best for me.
I close it.