diff --git a/core/modules/views/src/Tests/Handler/FieldCustomTest.php b/core/modules/views/src/Tests/Handler/FieldCustomTest.php index a94e46d..cfca608 100644 --- a/core/modules/views/src/Tests/Handler/FieldCustomTest.php +++ b/core/modules/views/src/Tests/Handler/FieldCustomTest.php @@ -7,6 +7,7 @@ namespace Drupal\views\Tests\Handler; +use Drupal\Component\Utility\Xss; use Drupal\views\Tests\ViewKernelTestBase; use Drupal\views\Views; @@ -24,18 +25,24 @@ class FieldCustomTest extends ViewKernelTestBase { */ public static $testViews = array('test_view'); + /** + * {@inheritdoc} + */ function viewsData() { $data = parent::viewsData(); $data['views_test_data']['name']['field']['id'] = 'custom'; return $data; } + /** + * Ensure that custom fields work and doesn't escape unnecessary markup. + */ public function testFieldCustom() { $view = Views::getView('test_view'); $view->setDisplay(); // Alter the text of the field to a random string. - $random = $this->randomMachineName(); + $random = '