class UpdateDescriptionConfigurationPostUpdate
@covers system_post_update_add_description_to_entity_view_mode
@covers system_post_update_add_description_to_entity_form_mode
@group Update
Hierarchy
- class \Drupal\Tests\system\Functional\Update\UpdateDescriptionConfigurationPostUpdate
Expanded class hierarchy of UpdateDescriptionConfigurationPostUpdate
File
-
core/
modules/ system/ tests/ src/ Functional/ Update/ UpdateDescriptionConfigurationPostUpdate.php, line 16
Namespace
Drupal\Tests\system\Functional\UpdateView source
class UpdateDescriptionConfigurationPostUpdate extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../system/tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz',
];
}
/**
* Ensure that an empty string is added as a default value for description.
*/
public function testUpdateDescriptionConfigurationPostUpdate() : void {
$view_mode = EntityViewMode::load('block_content.full');
$this->assertNull($view_mode->get('description'));
$this->runUpdates();
$view_mode = EntityViewMode::load('block_content.full');
$this->assertSame('', $view_mode->get('description'));
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
UpdateDescriptionConfigurationPostUpdate::$defaultTheme | protected | property | The theme to install as the default for testing. |
UpdateDescriptionConfigurationPostUpdate::setDatabaseDumpFiles | protected | function | Set database dump files to be used. |
UpdateDescriptionConfigurationPostUpdate::testUpdateDescriptionConfigurationPostUpdate | public | function | Ensure that an empty string is added as a default value for description. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.