views:

199

answers:

1

I am using the SimpleTest module version 6.x-2.8 with Drupal 6.13. I wrote a custom module, for which I wrote some tests. However, SimpleTest doesn't seem to be creating a copy of the table associated with my custom module, because I get an exception message for every time I try to insert something into the table or query it in the SimpleTest.

All insert queries result into something like this in the SimpleTest results page: Table 'db_name.simpletest692319new_table' doesn't exist query: INSERT INTO simpletest692319new_table(...)

There is a hook_schema() defined in my .install file for the module. Does anyone know if there's anything else that SimpleTest needs in order to recognize my table and create the copy of it?

Thanks.

A: 

Looking at CCK's implementation of SimpleTest it looks like you need to:

  function setUp() {
    $args = func_get_args();
    $modules = array_merge(array('my', 'list', 'of', 'modules'), $args);
    call_user_func_array(array('parent','setUp'), $modules);
  }
Dalin