Problem/Motivation
After running a Simpletest test case with a profile that is different from the main installation one, the schema information is not refreshed to hold the values of the main installation, causing errors to be thrown.
For example, having Views and Entity API enabled in the main installation but not in the test one, then the schema cache will miss some tables declared by entities not available in the test profile.
This is caused by calls to entity_get_info() with empty caches. The cache will be rebuilt for all the available entities, but calls to drupal_schema_field_types() and drupal_schema_fields_sql() will thrown a notice because some entity base table schemas are not available.
Proposed resolution
In the DrupalWebTestCase::tearDown() method, after resetting the module list and the module hooks implementations, reset also the schema information.
Remaining tasks
Test coverage for this use case.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | wrong_schema-2685705-2.patch | 497 bytes | sardara |
Comments
Comment #2
sardara CreditAttribution: sardara at Randstad Digital for Government of Flanders commentedComment #3
iSoLate CreditAttribution: iSoLate at Randstad Digital for Government of Flanders commentedWorks for me!