class RelationshipRepresentativeNodeTest
Same name in this branch
- 9 core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\user\Kernel\Views\RelationshipRepresentativeNodeTest
Same name and namespace in other branches
- 11.x core/modules/taxonomy/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\taxonomy\Kernel\Views\RelationshipRepresentativeNodeTest
- 11.x core/modules/user/tests/src/Kernel/Views/RelationshipRepresentativeNodeTest.php \Drupal\Tests\user\Kernel\Views\RelationshipRepresentativeNodeTest
Tests the representative node relationship for terms.
@group taxonomy
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\views\Functional\ViewTestBase uses \Drupal\views\Tests\ViewResultAssertionTrait implements \Drupal\Tests\BrowserTestBase
- class \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase uses \Drupal\Tests\field\Traits\EntityReferenceTestTrait implements \Drupal\Tests\views\Functional\ViewTestBase
- class \Drupal\Tests\taxonomy\Functional\Views\RelationshipRepresentativeNodeTest implements \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase
- class \Drupal\Tests\taxonomy\Functional\Views\TaxonomyTestBase uses \Drupal\Tests\field\Traits\EntityReferenceTestTrait implements \Drupal\Tests\views\Functional\ViewTestBase
- class \Drupal\Tests\views\Functional\ViewTestBase uses \Drupal\views\Tests\ViewResultAssertionTrait implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of RelationshipRepresentativeNodeTest
File
-
core/
modules/ taxonomy/ tests/ src/ Functional/ Views/ RelationshipRepresentativeNodeTest.php, line 12
Namespace
Drupal\Tests\taxonomy\Functional\ViewsView source
class RelationshipRepresentativeNodeTest extends TaxonomyTestBase {
/**
* Views used by this test.
*
* @var array
*/
public static $testViews = [
'test_groupwise_term',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests the relationship.
*/
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.