Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / views_ui / tests / src / Functional / DefaultViewsTest.php
similarity index 96%
rename from web/core/modules/views_ui/src/Tests/DefaultViewsTest.php
rename to web/core/modules/views_ui/tests/src/Functional/DefaultViewsTest.php
index a709d1f41382dee4bbd62389a7bc8ea3457e3865..91ee05be0cb26612d8432bf5054ce3852646a94b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
 
 use Drupal\Core\Url;
 use Drupal\user\Entity\Role;
@@ -20,11 +20,10 @@ class DefaultViewsTest extends UITestBase {
    */
   public static $testViews = ['test_view_status', 'test_page_display_menu', 'test_page_display_arguments'];
 
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
-  protected function setUp() {
-    parent::setUp();
-
-    $this->drupalPlaceBlock('page_title_block');
+    $this->placeBlock('page_title_block');
   }
 
   /**
@@ -228,9 +227,9 @@ class DefaultViewsTest extends UITestBase {
    *   failure. Failure also results in a failed assertion.
    */
   public function clickViewsOperationLink($label, $unique_href_part) {
-    $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => $label]);
+    $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => (string) $label]);
     foreach ($links as $link_index => $link) {
-      $position = strpos($link['href'], $unique_href_part);
+      $position = strpos($link->getAttribute('href'), $unique_href_part);
       if ($position !== FALSE) {
         $index = $link_index;
         break;
@@ -238,7 +237,7 @@ class DefaultViewsTest extends UITestBase {
     }
     $this->assertTrue(isset($index), format_string('Link to "@label" containing @part found.', ['@label' => $label, '@part' => $unique_href_part]));
     if (isset($index)) {
-      return $this->clickLink($label, $index);
+      return $this->clickLink((string) $label, $index);
     }
     else {
       return FALSE;