function RelationshipRepresentativeNodeTest::testRelationship
Same name in this branch
- 9 core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\user\Kernel\Views\RelationshipRepresentativeNodeTest::testRelationship()
Same name in other branches
- 8.9.x core/modules/taxonomy/tests/src/Functional/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\taxonomy\Functional\Views\RelationshipRepresentativeNodeTest::testRelationship()
- 8.9.x core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\user\Kernel\Views\RelationshipRepresentativeNodeTest::testRelationship()
- 10 core/modules/taxonomy/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\taxonomy\Kernel\Views\RelationshipRepresentativeNodeTest::testRelationship()
- 10 core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\user\Kernel\Views\RelationshipRepresentativeNodeTest::testRelationship()
- 11.x core/modules/taxonomy/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\taxonomy\Kernel\Views\RelationshipRepresentativeNodeTest::testRelationship()
- 11.x core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\user\Kernel\Views\RelationshipRepresentativeNodeTest::testRelationship()
Tests the relationship.
File
-
core/
modules/ taxonomy/ tests/ src/ Functional/ Views/ RelationshipRepresentativeNodeTest.php, line 29
Class
- RelationshipRepresentativeNodeTest
- Tests the representative node relationship for terms.
Namespace
Drupal\Tests\taxonomy\Functional\ViewsCode
public function testRelationship() {
$view = Views::getView('test_groupwise_term');
$this->executeView($view);
$map = [
'node_field_data_taxonomy_term_field_data_nid' => 'nid',
'tid' => 'tid',
];
$expected_result = [
[
'nid' => $this->nodes[1]
->id(),
'tid' => $this->term2
->id(),
],
[
'nid' => $this->nodes[1]
->id(),
'tid' => $this->term1
->id(),
],
];
$this->assertIdenticalResultset($view, $expected_result, $map);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.