You are here

protected function HierarchyNestedSetIntegrationTest::getChildren in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/HierarchyNestedSetIntegrationTest.php \Drupal\Tests\entity_hierarchy\Kernel\HierarchyNestedSetIntegrationTest::getChildren()

Gets children of a given node.

Parameters

\PNX\NestedSet\Node $parent_node: Parent node.

Return value

\PNX\NestedSet\Node[] Children

8 calls to HierarchyNestedSetIntegrationTest::getChildren()
HierarchyNestedSetIntegrationTest::assertChildOrder in tests/src/Kernel/HierarchyNestedSetIntegrationTest.php
Asserts children in given order.
HierarchyNestedSetIntegrationTest::assertParentWithTwoChildren in tests/src/Kernel/HierarchyNestedSetIntegrationTest.php
Test parent/child relationship.
HierarchyNestedSetIntegrationTest::assertSimpleParentChild in tests/src/Kernel/HierarchyNestedSetIntegrationTest.php
Test parent/child relationship.
HierarchyNestedSetIntegrationTest::testDeleteChild in tests/src/Kernel/HierarchyNestedSetIntegrationTest.php
Tests deleting child node.
HierarchyNestedSetIntegrationTest::testDeleteParent in tests/src/Kernel/HierarchyNestedSetIntegrationTest.php
Tests deleting parent node reparents children.

... See full list

1 method overrides HierarchyNestedSetIntegrationTest::getChildren()
HierarchyNestedSetRevisionIntegrationTest::getChildren in tests/src/Kernel/HierarchyNestedSetRevisionIntegrationTest.php
Gets children of a given node.

File

tests/src/Kernel/HierarchyNestedSetIntegrationTest.php, line 378

Class

HierarchyNestedSetIntegrationTest
Tests integration with entity_hierarchy.

Namespace

Drupal\Tests\entity_hierarchy\Kernel

Code

protected function getChildren(Node $parent_node) {
  return $this->treeStorage
    ->findChildren($parent_node
    ->getNodeKey());
}