function FilterAPITest::testFilterFormatAPI

Tests the function filter_get_filter_types_by_format().

File

drupal/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php, line 95
Definition of Drupal\filter\Tests\FilterAPITest.

Class

FilterAPITest
Tests the behavior of Filter's API.

Namespace

Drupal\filter\Tests

Code

function testFilterFormatAPI() {

  // Test on filtered_html.
  $this
    ->assertEqual(filter_get_filter_types_by_format('filtered_html'), array(
    FILTER_TYPE_HTML_RESTRICTOR,
    FILTER_TYPE_MARKUP_LANGUAGE,
  ), 'filter_get_filter_types_by_format() works as expected for the filtered_html format.');

  // Test on full_html.
  $this
    ->assertEqual(filter_get_filter_types_by_format('full_html'), array(
    FILTER_TYPE_HTML_RESTRICTOR,
  ), 'filter_get_filter_types_by_format() works as expected for the full_html format.');
}