Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
(From #1212992: Prevent tests from deleting main installation's tables when parent::setUp() is not called.)
-
If a test method disables a module during the course of the test's execution, that module's database tables will not be cleaned during tearDown(), because it retrieves the list of tables using
drupal_get_schema()
.One test which shows this behavior is the Field API -> Field info tests (
FieldInfoTestCase
).
Proposed resolution
- TBD
Remaining tasks
- TBD
User interface changes
- None.
API changes
- None.
Comments
Comment #1
xjmComment #2
sunI didn't know of this issue. But apparently, my follow-up patch in #1541958-18: Split setUp() into specific sub-methods fixes this issue. So sorry! ;)
Comment #3
catchComment #4
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedI've added tests that all test tables are deleted in #1713332-40: The SQLite database driver fails to drop simpletest tables.
Comment #5
Dave ReidRelated: #2507157: drupal_get_schema() not reset after disabling a module