By amateescu on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.7.x
Introduced in version:
8.7.0
Issue links:
Description:
Starting with Drupal 8.7.0, all kernel tests that are testing an integration with an entity type have to install the definition of that entity type in their setUp() method. Additionally, if any module-provided configuration is also added in setUp() (via $this->installConfig()), it needs to be done after installing the entity type.
This change is needed when module-provided configuration contains, for example, configurable fields, which now require the entity type definition to be available in the last installed schema definitions service.
Code example before
protected function setUp() {
parent::setUp();
$this->installConfig(['block_content']);
$this->installEntitySchema('block_content');
}
Code example after
protected function setUp() {
parent::setUp();
$this->installEntitySchema('block_content');
$this->installConfig(['block_content']);
}
Impacts:
Module developers