diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index bbbd774..b55066f 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -4,6 +4,7 @@
* @file
* Framework for handling the filtering of content.
*/
+
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Template\Attribute;
@@ -574,6 +575,7 @@ function filter_default_format($account = NULL) {
*
* @param string $format_id
* A text format ID.
+ *
* @return array
* All filter types used by filters of a given text format.
*
@@ -812,9 +814,9 @@ function filter_list_format($format_id) {
* The caller may set this to FALSE when the output is already cached
* elsewhere to avoid duplicate cache lookups and storage.
* @param array $filter_types_to_skip
- * An array of filter types to skip, or the empty array (default) to skip no
- * filter types. All of the format's filters will be applied, except for
- * filters of the types that are marked to be skipped.
+ * (optional) An array of filter types to skip, or an empty array (default)
+ * to skip no filter types. All of the format's filters will be applied,
+ * except for filters of the types that are marked to be skipped.
* FILTER_TYPE_HTML_RESTRICTOR is the only type that cannot be skipped.
*
* @return
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
index d98e5a8..e355f2d 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterAPITest.php
@@ -13,6 +13,7 @@
* Tests the behavior of Filter's API.
*/
class FilterAPITest extends WebTestBase {
+
public static function getInfo() {
return array(
'name' => 'API',
@@ -70,12 +71,12 @@ function testCheckMarkup() {
$this->assertIdentical(
check_markup($text, 'filtered_html', '', FALSE, array()),
$expected_filtered_text,
- t('Expected filter result.')
+ 'Expected filter result.'
);
$this->assertIdentical(
check_markup($text, 'filtered_html', '', FALSE, array(FILTER_TYPE_MARKUP_LANGUAGE)),
$expected_filter_text_without_html_generators,
- t('Expected filter result when skipping FILTER_TYPE_MARKUP_LANGUAGE filters.')
+ 'Expected filter result when skipping FILTER_TYPE_MARKUP_LANGUAGE filters.'
);
// Related to @see FilterSecurityTest.php/testSkipSecurityFilters(), but
// this check focuses on the ability to filter multiple filter types at once.
@@ -84,23 +85,27 @@ function testCheckMarkup() {
$this->assertIdentical(
check_markup($text, 'filtered_html', '', FALSE, array(FILTER_TYPE_HTML_RESTRICTOR, FILTER_TYPE_MARKUP_LANGUAGE)),
$expected_filter_text_without_html_generators,
- t('Expected filter result when skipping FILTER_TYPE_MARKUP_LANGUAGE filters, even when trying to disable filters of the FILTER_TYPE_HTML_RESTRICTOR type.')
+ 'Expected filter result when skipping FILTER_TYPE_MARKUP_LANGUAGE filters, even when trying to disable filters of the FILTER_TYPE_HTML_RESTRICTOR type.'
);
}
+ /**
+ * Tests the function filter_get_filter_types_by_format().
+ */
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),
- t('filter_get_filter_types_by_format() works as expected for the filtered_html format.')
+ '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),
- t('filter_get_filter_types_by_format() works as expected for the full_html format.')
+ 'filter_get_filter_types_by_format() works as expected for the full_html format.'
);
}
+
}
diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
index 1e37b95..006bfe3 100644
--- a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
+++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php
@@ -90,13 +90,12 @@ function testDisableFilterModule() {
}
/**
- * Tests that when security filters are marked to be skipped, they are still
- * enforced anyway.
+ * Tests that security filters are enforced even when marked to be skipped.
*/
function testSkipSecurityFilters() {
$text = "Text with some disallowed tags: , ,
.";
$expected_filtered_text = "Text with some disallowed tags: , unicorn, .";
- $this->assertEqual(check_markup($text, 'filtered_html', '', FALSE, array()), $expected_filtered_text, t('Expected filter result.'));
- $this->assertEqual(check_markup($text, 'filtered_html', '', FALSE, array(FILTER_TYPE_HTML_RESTRICTOR)), $expected_filtered_text, t('Expected filter result, even when trying to disable filters of the FILTER_TYPE_HTML_RESTRICTOR type.'));
+ $this->assertEqual(check_markup($text, 'filtered_html', '', FALSE, array()), $expected_filtered_text, 'Expected filter result.');
+ $this->assertEqual(check_markup($text, 'filtered_html', '', FALSE, array(FILTER_TYPE_HTML_RESTRICTOR)), $expected_filtered_text, 'Expected filter result, even when trying to disable filters of the FILTER_TYPE_HTML_RESTRICTOR type.');
}
}