diff --git a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php index 5232f5d..1a636c1 100644 --- a/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php +++ b/core/modules/dblog/src/Tests/Views/ViewsIntegrationTest.php @@ -94,12 +94,15 @@ public function testIntegration() { $this->executeView($view); $view->initStyle(); - // Make sure that the link containing unsafe markup differs from the - // rendered link. - $this->assertNotEqual($view->style_plugin->getField(2, 'link'), $entries[2]['variables']['link']); foreach ($entries as $index => $entry) { $this->assertEqual($view->style_plugin->getField($index, 'message'), SafeMarkup::format($entry['message'], $entry['variables'])); $link_field = $view->style_plugin->getField($index, 'link'); + // The 3rd entry contains some unsafe markup that needs to get filtered. + if ($index == 2) { + // Make sure that unsafe link differs from the rendered link, so we know + // that some filtering actually happened. + $this->assertNotEqual($link_field, $entry['variables']['link']); + } $this->assertEqual($link_field, Xss::filterAdmin($entry['variables']['link'])); }