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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sardara created an issue. See original summary.

sardara’s picture

Assigned: sardara » Unassigned
Status: Active » Needs review
FileSize
497 bytes
iSoLate’s picture

Works for me!