Drupal 8  8.0.2
FilterAPITest Class Reference
Inheritance diagram for FilterAPITest:

Public Member Functions

 testCheckMarkupFilterOrder ()
 testCheckMarkupFilterSubset ()
 testFilterFormatAPI ()
 testProcessedTextElement ()
 testTypedDataAPI ()
 assertFilterFormatViolation (ConstraintViolationListInterface $violations, $invalid_value)
 testDependencyRemoval ()

Static Public Attributes

static $modules = array('system', 'filter', 'filter_test', 'user')
- Static Public Attributes inherited from EntityUnitTestBase
static $modules = ['user', 'system', 'field', 'text', 'filter', 'entity_test']

Protected Member Functions

 setUp ()
- Protected Member Functions inherited from EntityUnitTestBase
 setUp ()
 createUser ($values=array(), $permissions=array())
 reloadEntity (EntityInterface $entity)
 getHooksInfo ()
 installModule ($module)
 uninstallModule ($module)
 refreshServices ()
 generateRandomEntityId ($string=FALSE)

Additional Inherited Members

- Protected Attributes inherited from EntityUnitTestBase
 $generatedIds = array()

Detailed Description

Tests the behavior of the API of the Filter module.


Member Function Documentation

assertFilterFormatViolation ( ConstraintViolationListInterface  $violations,

Checks if an expected violation exists in the given violations.

\Symfony\Component\Validator\ConstraintViolationListInterface$violationsThe violations to assert.
mixed$invalid_valueThe expected invalid value.

References format_string().

Referenced by FilterAPITest\testTypedDataAPI().

Here is the call graph for this function:

Here is the caller graph for this function:

testCheckMarkupFilterOrder ( )

Tests that the filter order is respected.

testCheckMarkupFilterSubset ( )

Tests the ability to apply only a subset of filters.

References FilterInterface\TYPE_HTML_RESTRICTOR, and FilterInterface\TYPE_MARKUP_LANGUAGE.

testDependencyRemoval ( )

Tests that filter format dependency removal works.

Ensure that modules providing filter plugins are required when the plugin is in use, and that only disabled plugins are removed from format configuration entities rather than the configuration entities being deleted.

See Also

References Drupal\entityManager(), and Drupal\service().

Here is the call graph for this function:

testFilterFormatAPI ( )

Tests the following functions for a variety of formats:

  • ::getHtmlRestrictions()
  • ::getFilterTypes()

References FilterInterface\TYPE_HTML_RESTRICTOR, and FilterInterface\TYPE_MARKUP_LANGUAGE.

testProcessedTextElement ( )

Tests the 'processed_text' element.

check_markup() is a wrapper for the 'processed_text' element, for use in simple scenarios; the 'processed_text' element has more advanced features: it lets filters attach assets, associate cache tags and define #lazy_builder callbacks. This test focuses solely on those advanced features.

References LanguageInterface\TYPE_CONTENT, and LanguageInterface\TYPE_INTERFACE.

testTypedDataAPI ( )

Tests the function of the typed data type.

References FilterAPITest\assertFilterFormatViolation(), DataDefinition\create(), EntityUnitTestBase\createUser(), Drupal\currentUser(), and Drupal\typedDataManager().

Here is the call graph for this function:

The documentation for this class was generated from the following file: