Problem/Motivation
If you have a hook_update_N()
function that installs a module and changes entity definitions (for example using hook_entity_base_field_info()
) then any UpdatePathTestBase tests will fail because the entity definition update check in \Drupal\FunctionalTests\Update\UpdatePathTestBase::runUpdates()
will detect changes. This is because the test runner's module handler service has not been updated with the new modules. Calling \Drupal\Core\Test\FunctionalTestSetupTrait::resetAll() or \Drupal\Core\Test\FunctionalTestSetupTrait::rebuildContainer() is not enough to update the module list.
Proposed resolution
Add new modules to the test runner's module handler and then reset everything so the test running environment is up-to-date with any changes.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None