You are here

protected function TestTextFormatConfiguration::createConfigToExport in Configuration Management 7.2

This function creates the configurations that will be exported by configuration management.

Overrides ConfigurationHandlerBaseTestCase::createConfigToExport

File

tests/handlers/TestTextFormatConfiguration.test, line 61

Class

TestTextFormatConfiguration

Code

protected function createConfigToExport() {
  $custom_plain_text_format = array(
    'format' => 'custom_plain_text',
    'name' => 'Custom Plain text',
    'weight' => 10,
    'filters' => array(
      // Escape all HTML.
      'filter_html_escape' => array(
        'weight' => 0,
        'status' => 1,
      ),
      // URL filter.
      'filter_url' => array(
        'weight' => 1,
        'status' => 1,
      ),
      // Line break filter.
      'filter_autop' => array(
        'weight' => 2,
        'status' => 1,
      ),
    ),
  );
  $custom_plain_text_format = (object) $custom_plain_text_format;
  filter_format_save($custom_plain_text_format);
}