Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / taxonomy / tests / src / Functional / Views / TaxonomyIndexTidUiTest.php
similarity index 96%
rename from web/core/modules/taxonomy/src/Tests/Views/TaxonomyIndexTidUiTest.php
rename to web/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php
index efa51916ddcb42d48651cde0d3427896f8606f58..4de73705d991e2bb13133f7c3d0b94e04c8d818d 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 
-namespace Drupal\taxonomy\Tests\Views;
+namespace Drupal\Tests\taxonomy\Functional\Views;
 
 use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
 use Drupal\taxonomy\Entity\Term;
 use Drupal\taxonomy\Entity\Vocabulary;
+use Drupal\Tests\views_ui\Functional\UITestBase;
 use Drupal\views\Tests\ViewTestData;
-use Drupal\views_ui\Tests\UITestBase;
 use Drupal\views\Entity\View;
 
 /**
@@ -43,8 +43,8 @@ class TaxonomyIndexTidUiTest extends UITestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
-    parent::setUp();
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
 
     $this->adminUser = $this->drupalCreateUser(['administer taxonomy', 'administer views']);
     $this->drupalLogin($this->adminUser);
@@ -93,10 +93,9 @@ class TaxonomyIndexTidUiTest extends UITestBase {
       for ($j = 0; $j <= $i; $j++) {
         $option = $result[$counter++];
         $prefix = $this->terms[$i][$j]->parent->target_id ? '-' : '';
-        $attributes = $option->attributes();
-        $tid = (string) $attributes->value;
+        $tid = $option->getAttribute('value');
 
-        $this->assertEqual($prefix . $this->terms[$i][$j]->getName(), (string) $option);
+        $this->assertEqual($prefix . $this->terms[$i][$j]->getName(), $option->getText());
         $this->assertEqual($this->terms[$i][$j]->id(), $tid);
       }
     }
@@ -108,7 +107,7 @@ class TaxonomyIndexTidUiTest extends UITestBase {
     $display['display_options']['filters']['tid']['type'] = 'textfield';
     $view->save();
     $this->drupalGet('admin/structure/views/nojs/handler/test_filter_taxonomy_index_tid/default/filter/tid');
-    $this->assertFieldByXPath('//input[@id="edit-options-value"]');
+    $this->assertFieldById('edit-options-value', NULL);
 
     // Tests \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::calculateDependencies().
     $expected = [