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