public function RelationshipRepresentativeNode::testRelationship in Views (for Drupal 7) 8.3
Same name in this branch
- 8.3 lib/Drupal/views/Tests/Taxonomy/RelationshipRepresentativeNode.php \Drupal\views\Tests\Taxonomy\RelationshipRepresentativeNode::testRelationship()
- 8.3 lib/Drupal/views/Tests/User/RelationshipRepresentativeNode.php \Drupal\views\Tests\User\RelationshipRepresentativeNode::testRelationship()
Tests the relationship.
File
- lib/
Drupal/ views/ Tests/ User/ RelationshipRepresentativeNode.php, line 26 - Definition of Drupal\views\Tests\User\RelationshipRepresentativeNode.
Class
- RelationshipRepresentativeNode
- Tests the representative node relationship for users.
Namespace
Drupal\views\Tests\UserCode
public function testRelationship() {
$view = views_get_view('test_groupwise_user');
$this
->executeView($view);
$map = array(
'node_users_nid' => 'nid',
'uid' => 'uid',
);
$expected_result = array(
array(
'uid' => $this->users[1]->uid,
'nid' => $this->nodes[1]->nid,
),
array(
'uid' => $this->users[0]->uid,
'nid' => $this->nodes[0]->nid,
),
);
$this
->assertIdenticalResultset($view, $expected_result, $map);
}