Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295277

UpdatePathTestBase fails to pick up new modules

$
0
0

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


Viewing all articles
Browse latest Browse all 295277

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>