function FilterFormatConsolidateFilterConfigUpdateTest::testConsolidateFilterConfig
Same name in other branches
- 10 core/modules/filter/tests/src/Functional/FilterFormatConsolidateFilterConfigUpdateTest.php \Drupal\Tests\filter\Functional\FilterFormatConsolidateFilterConfigUpdateTest::testConsolidateFilterConfig()
@covers \filter_post_update_consolidate_filter_config
File
-
core/
modules/ filter/ tests/ src/ Functional/ FilterFormatConsolidateFilterConfigUpdateTest.php, line 32
Class
- FilterFormatConsolidateFilterConfigUpdateTest
- Tests the upgrade path for filter formats.
Namespace
Drupal\Tests\filter\FunctionalCode
public function testConsolidateFilterConfig() {
$format = $this->config('filter.format.plain_text');
$this->assertArrayNotHasKey('id', $format->get('filters.filter_autop'));
$this->assertSame('filter', $format->get('filters.filter_autop.provider'));
$this->assertSame('filter_html_escape', $format->get('filters.filter_html_escape.id'));
$this->assertArrayNotHasKey('provider', $format->get('filters.filter_html_escape'));
$this->assertArrayNotHasKey('id', $format->get('filters.filter_url'));
$this->assertArrayNotHasKey('provider', $format->get('filters.filter_url'));
$this->runUpdates();
$format = $this->config('filter.format.plain_text');
$this->assertSame('filter_autop', $format->get('filters.filter_autop.id'));
$this->assertSame('filter', $format->get('filters.filter_autop.provider'));
$this->assertSame('filter_html_escape', $format->get('filters.filter_html_escape.id'));
$this->assertSame('filter', $format->get('filters.filter_html_escape.provider'));
$this->assertSame('filter_url', $format->get('filters.filter_url.id'));
$this->assertSame('filter', $format->get('filters.filter_url.provider'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.