summaryrefslogtreecommitdiffstats
path: root/core/modules/views_ui
diff options
context:
space:
mode:
authorNathaniel Catchpole2018-07-25 06:42:16 (GMT)
committerNathaniel Catchpole2018-07-25 06:42:21 (GMT)
commit25c15a1e76744fb0849112f381331e32dc84aa9b (patch)
tree4bf693d531872c4c5e3e7f4e205b63a808ea5fca /core/modules/views_ui
parent6b70114493d30b3f9509ed392e8dfd7a83129ef2 (diff)
Issue #2987009 by alexpott: Remove unnecessary space in queries generated by Select::__toString()
(cherry picked from commit 3b3eda50544a3c4e1c47d31cdecb6f21d7bee11e)
Diffstat (limited to 'core/modules/views_ui')
-rw-r--r--core/modules/views_ui/src/Tests/PreviewTest.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/modules/views_ui/src/Tests/PreviewTest.php b/core/modules/views_ui/src/Tests/PreviewTest.php
index 657c870..c8bd7bd 100644
--- a/core/modules/views_ui/src/Tests/PreviewTest.php
+++ b/core/modules/views_ui/src/Tests/PreviewTest.php
@@ -105,7 +105,13 @@ class PreviewTest extends UITestBase {
$this->assertText(t('Query execute time'));
$this->assertText(t('View render time'));
$this->assertRaw('<strong>Query</strong>');
- $this->assertText("SELECT views_test_data.name AS views_test_data_name\nFROM \n{views_test_data} views_test_data\nWHERE (views_test_data.id = &#039;100&#039;)");
+ $query_string = <<<SQL
+SELECT views_test_data.name AS views_test_data_name
+FROM
+{views_test_data} views_test_data
+WHERE (views_test_data.id = '100')
+SQL;
+ $this->assertEscaped($query_string);
// Test that the statistics and query are rendered above the preview.
$this->assertTrue(strpos($this->getRawContent(), 'views-query-info') < strpos($this->getRawContent(), 'view-test-preview'), 'Statistics shown above the preview.');