For a correct cloning of the database, the real db schema should be 100% matching the hook_schema.
Any tables not declared in hook_schemas are not cloned. Tables with mismatching schema, will have incorrect schema or invalid values on the cloned database.
The status of the schema can be seen with the "Schema" module at /admin/build/schema.
Unfortunately broken schemas are very common. Even cck tables usually have mismatches and big websites with many modules may have a lot of them, making impossible to use simpletest_clone correctly.
The attached patch makes uses of functions from the schema module to generate the cloned database exactly with the real schema of the current database.
To use this feature you must have the schema module enabled.
| Comment | File | Size | Author |
|---|---|---|---|
| simpletest-clone-schema.patch | 659 bytes | Pedro Lozano |
Comments
Comment #1
Pedro Lozano commentedTODO: make sure that tearDown deletes all tables too.
Comment #2
jhedstromFixed in 1.3. Thanks!