diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index a45cdf2..10fc04a 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -875,10 +875,12 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $this->documentSelfTokens($options[t('Fields')]); // Default text. - $output = '

' . $this->t('You must add some additional fields to this display before using this field. These fields may be marked as Exclude from display if you prefer. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.') . '

'; + + $output = []; + $output[][ '#markup'] = '

' . $this->t('You must add some additional fields to this display before using this field. These fields may be marked as Exclude from display if you prefer. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.') . '

'; // We have some options, so make a list. if (!empty($options)) { - $output = '

' . $this->t("The following replacement tokens are available for this field. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.") . '

'; + $output[]['#markup'] = '

' . $this->t("The following replacement tokens are available for this field. Note that due to rendering order, you cannot use fields that come after this field; if you need a field not listed here, rearrange your fields.") . '

'; foreach (array_keys($options) as $type) { if (!empty($options[$type])) { $items = array(); @@ -890,7 +892,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#items' => $items, '#list_type' => $type, ); - $output .= $this->getRenderer()->renderPlain($item_list); + $output[] = $item_list; } } } @@ -901,7 +903,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['alter']['help'] = array( '#type' => 'details', '#title' => $this->t('Replacement patterns'), - '#value' => SafeMarkup::set($output), + '#value' => $output, '#states' => array( 'visible' => array( array( diff --git a/core/modules/views_ui/src/Tests/FieldUITest.php b/core/modules/views_ui/src/Tests/FieldUITest.php index 3b66c21..34d4215 100644 --- a/core/modules/views_ui/src/Tests/FieldUITest.php +++ b/core/modules/views_ui/src/Tests/FieldUITest.php @@ -67,7 +67,7 @@ public function testFieldUI() { /** * Tests the field labels. */ - public function atestFieldLabel() { + public function testFieldLabel() { // Create a view with unformatted style and make sure the fields have no // labels by default. $view = array(); diff --git a/core/modules/views_ui/src/Tests/PreviewTest.php b/core/modules/views_ui/src/Tests/PreviewTest.php index 01816af..ff10213 100644 --- a/core/modules/views_ui/src/Tests/PreviewTest.php +++ b/core/modules/views_ui/src/Tests/PreviewTest.php @@ -26,7 +26,7 @@ class PreviewTest extends UITestBase { /** * Tests contextual links in the preview form. */ - public function atestPreviewContextual() { + public function testPreviewContextual() { \Drupal::service('module_installer')->install(array('contextual')); $this->resetAll(); @@ -49,7 +49,7 @@ public function atestPreviewContextual() { /** * Tests arguments in the preview form. */ - function atestPreviewUI() { + function testPreviewUI() { $this->drupalGet('admin/structure/views/view/test_preview/edit'); $this->assertResponse(200); @@ -99,7 +99,7 @@ function atestPreviewUI() { * * @see https://www.drupal.org/node/2452659 */ - public function atestTaxonomyAJAX() { + public function testTaxonomyAJAX() { \Drupal::service('module_installer')->install(array('taxonomy')); $this->getPreviewAJAX('taxonomy_term', 'page_1', 0); } @@ -212,7 +212,7 @@ public function testPreviewWithPagersUI() { /** * Tests the additional information query info area. */ - public function atestPreviewAdditionalInfo() { + public function testPreviewAdditionalInfo() { \Drupal::service('module_installer')->install(array('views_ui_test')); $this->resetAll();