diff --git a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php index 5b0b355..930990f 100644 --- a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php +++ b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php @@ -26,32 +26,25 @@ class RelationshipNodeTermDataTest extends TaxonomyTestBase { function testViewsHandlerRelationshipNodeTermData() { $view = Views::getView('test_taxonomy_node_term_data'); $this->executeView($view, array($this->term1->id(), $this->term2->id())); - $resultset = array( + $expected_result = array( array( - 'nid' => $this->nodes[0]->id(), + 'nid' => $this->nodes[1]->id(), ), array( - 'nid' => $this->nodes[1]->id(), + 'nid' => $this->nodes[0]->id(), ), ); - $this->column_map = array('nid' => 'nid'); - $this->assertIdenticalResultset($view, $resultset, $this->column_map); + $column_map = array('nid' => 'nid'); + $this->assertIdenticalResultset($view, $expected_result, $column_map); - $view = Views::getView('test_taxonomy_node_term_data'); - $view->initHandlers(); // Change the view to test relation limited by vocabulary. - $view->relationship['term_node_tid']->options['vids'] = ['tags' => 'tags']; + \Drupal::config('views.view.test_taxonomy_node_term_data') + ->set('display.default.display_options.relationships.term_node_tid.vids.tags', 'views_testing_tags') + ->save(); + + $view = Views::getView('test_taxonomy_node_term_data'); $this->executeView($view, array($this->term1->id(), $this->term2->id())); - $resultset = array( - array( - 'nid' => $this->nodes[0]->id(), - ), - array( - 'nid' => $this->nodes[1]->id(), - ), - ); - $this->column_map = array('nid' => 'nid'); - $this->assertIdenticalResultset($view, $resultset, $this->column_map); + $this->assertIdenticalResultset($view, $expected_result, $column_map); } } diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml index 8b7fcbb..afdd91e 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml @@ -66,7 +66,7 @@ display: field: nid id: nid order: DESC - table: nid + table: node plugin_id: standard provider: views style: