Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / taxonomy / tests / src / Functional / Views / TaxonomyRelationshipTest.php
index 03be3e15bb389da446595136f76bc6cc67a80e12..3299964909525c40faa5f0358807fd94a2f7d8f7 100644 (file)
@@ -61,24 +61,24 @@ class TaxonomyRelationshipTest extends TaxonomyTestBase {
     $this->assertEqual($views_data['table']['join']['taxonomy_term_field_data']['field'], 'tid');
     $this->assertEqual($views_data['table']['join']['node_field_data']['left_field'], 'nid');
     $this->assertEqual($views_data['table']['join']['node_field_data']['field'], 'nid');
-    $this->assertEqual($views_data['table']['join']['taxonomy_term_hierarchy']['left_field'], 'tid');
-    $this->assertEqual($views_data['table']['join']['taxonomy_term_hierarchy']['field'], 'tid');
+    $this->assertEqual($views_data['table']['join']['taxonomy_term__parent']['left_field'], 'entity_id');
+    $this->assertEqual($views_data['table']['join']['taxonomy_term__parent']['field'], 'tid');
 
-    // Check the generated views data of taxonomy_term_hierarchy.
-    $views_data = Views::viewsData()->get('taxonomy_term_hierarchy');
+    // Check the generated views data of taxonomy_term__parent.
+    $views_data = Views::viewsData()->get('taxonomy_term__parent');
     // Check the table join data.
-    $this->assertEqual($views_data['table']['join']['taxonomy_term_hierarchy']['left_field'], 'tid');
-    $this->assertEqual($views_data['table']['join']['taxonomy_term_hierarchy']['field'], 'parent');
+    $this->assertEqual($views_data['table']['join']['taxonomy_term__parent']['left_field'], 'entity_id');
+    $this->assertEqual($views_data['table']['join']['taxonomy_term__parent']['field'], 'parent_target_id');
     $this->assertEqual($views_data['table']['join']['taxonomy_term_field_data']['left_field'], 'tid');
-    $this->assertEqual($views_data['table']['join']['taxonomy_term_field_data']['field'], 'tid');
+    $this->assertEqual($views_data['table']['join']['taxonomy_term_field_data']['field'], 'entity_id');
     // Check the parent relationship data.
-    $this->assertEqual($views_data['parent']['relationship']['base'], 'taxonomy_term_field_data');
-    $this->assertEqual($views_data['parent']['relationship']['field'], 'parent');
-    $this->assertEqual($views_data['parent']['relationship']['label'], t('Parent'));
-    $this->assertEqual($views_data['parent']['relationship']['id'], 'standard');
+    $this->assertEqual($views_data['parent_target_id']['relationship']['base'], 'taxonomy_term_field_data');
+    $this->assertEqual($views_data['parent_target_id']['relationship']['base field'], 'tid');
+    $this->assertEqual($views_data['parent_target_id']['relationship']['label'], t('Parent'));
+    $this->assertEqual($views_data['parent_target_id']['relationship']['id'], 'standard');
     // Check the parent filter and argument data.
-    $this->assertEqual($views_data['parent']['filter']['id'], 'numeric');
-    $this->assertEqual($views_data['parent']['argument']['id'], 'taxonomy');
+    $this->assertEqual($views_data['parent_target_id']['filter']['id'], 'numeric');
+    $this->assertEqual($views_data['parent_target_id']['argument']['id'], 'taxonomy');
 
     // Check an actual test view.
     $view = Views::getView('test_taxonomy_term_relationship');
@@ -95,7 +95,7 @@ class TaxonomyRelationshipTest extends TaxonomyTestBase {
       if (!$index) {
         $this->assertTrue($row->_relationship_entities['parent'] instanceof TermInterface);
         $this->assertEqual($row->_relationship_entities['parent']->id(), $this->term2->id());
-        $this->assertEqual($row->taxonomy_term_field_data_taxonomy_term_hierarchy_tid, $this->term2->id());
+        $this->assertEqual($row->taxonomy_term_field_data_taxonomy_term__parent_tid, $this->term2->id());
       }
       $this->assertTrue($row->_relationship_entities['nid'] instanceof NodeInterface);
       $this->assertEqual($row->_relationship_entities['nid']->id(), $this->nodes[$index]->id());