X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews_ui%2Fsrc%2FTests%2FPreviewTest.php;h=c723cb3b7689a0965f510d0ce574b3ef0bfc8d27;hp=95fba8c6ad0340f82d59ab9b32f3239fe320e532;hb=bfbba508964731508b9bd6d5835c2edc858db95b;hpb=cb9a80db11fc6b014e5b1e693a5a391c95eb5d9a diff --git a/web/core/modules/views_ui/src/Tests/PreviewTest.php b/web/core/modules/views_ui/src/Tests/PreviewTest.php index 95fba8c6a..c723cb3b7 100644 --- a/web/core/modules/views_ui/src/Tests/PreviewTest.php +++ b/web/core/modules/views_ui/src/Tests/PreviewTest.php @@ -114,6 +114,12 @@ class PreviewTest extends UITestBase { $settings->set('ui.show.sql_query.where', 'below')->save(); $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview')); $this->assertTrue(strpos($this->getRawContent(), 'view-test-preview') < strpos($this->getRawContent(), 'views-query-info'), 'Statistics shown below the preview.'); + + // Test that the preview title isn't double escaped. + $this->drupalPostForm("admin/structure/views/nojs/display/test_preview/default/title", $edit = ['title' => 'Double & escaped'], t('Apply')); + $this->drupalPostForm(NULL, [], t('Update preview')); + $elements = $this->xpath('//div[@id="views-live-preview"]/div[contains(@class, views-query-info)]//td[text()=:text]', [':text' => t('Double & escaped')]); + $this->assertEqual(1, count($elements)); } /**