Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / views_ui / tests / src / Functional / SettingsTest.php
similarity index 91%
rename from web/core/modules/views_ui/src/Tests/SettingsTest.php
rename to web/core/modules/views_ui/tests/src/Functional/SettingsTest.php
index f583185cdb576c8939da8dc375a34b1488199561..1ac98c6e634f702a7103865475829e3d2d6828b7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 /**
  * Tests all ui related settings under admin/structure/views/settings.
@@ -19,8 +19,8 @@ class SettingsTest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
     $this->drupalPlaceBlock('local_tasks_block');
   }
 
@@ -82,7 +82,7 @@ class SettingsTest extends UITestBase {
 
     $view['id'] = strtolower($this->randomMachineName());
     $this->drupalPostForm('admin/structure/views/add', $view, t('Save and edit'));
-    $this->assertFieldById('edit-displays-top-add-display-embed');
+    $this->assertFieldById('edit-displays-top-add-display-embed', NULL);
 
     $edit = [
       'ui_show_display_embed' => FALSE,
@@ -116,8 +116,8 @@ class SettingsTest extends UITestBase {
     $this->drupalPostForm(NULL, [], t('Update preview'));
     $xpath = $this->xpath('//div[@class="views-query-info"]//pre');
     $this->assertEqual(count($xpath), 1, 'The views sql is shown.');
-    $this->assertFalse(strpos($xpath[0], 'db_condition_placeholder') !== FALSE, 'No placeholders are shown in the views sql.');
-    $this->assertTrue(strpos($xpath[0], "node_field_data.status = '1'") !== FALSE, 'The placeholders in the views sql is replace by the actual value.');
+    $this->assertFalse(strpos($xpath[0]->getText(), 'db_condition_placeholder') !== FALSE, 'No placeholders are shown in the views sql.');
+    $this->assertTrue(strpos($xpath[0]->getText(), "node_field_data.status = '1'") !== FALSE, 'The placeholders in the views sql is replace by the actual value.');
 
     // Test the advanced settings form.