3 namespace Drupal\Tests\taxonomy\Functional\Views;
5 use Drupal\views\Views;
8 * Tests the representative node relationship for terms.
12 class RelationshipRepresentativeNodeTest extends TaxonomyTestBase {
15 * Views used by this test.
19 public static $testViews = ['test_groupwise_term'];
22 * Tests the relationship.
24 public function testRelationship() {
25 $view = Views::getView('test_groupwise_term');
26 $this->executeView($view);
27 $map = ['node_field_data_taxonomy_term_field_data_nid' => 'nid', 'tid' => 'tid'];
30 'nid' => $this->nodes[1]->id(),
31 'tid' => $this->term2->id(),
34 'nid' => $this->nodes[1]->id(),
35 'tid' => $this->term1->id(),
38 $this->assertIdenticalResultset($view, $expected_result, $map);