You are here

public function HierarchyNestedSetIntegrationTest::testNestedSetParentToChild in Entity Reference Hierarchy 8.2

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

Tests moving from out of tree, into tree.

File

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

Class

HierarchyNestedSetIntegrationTest
Tests integration with entity_hierarchy.

Namespace

Drupal\Tests\entity_hierarchy\Kernel

Code

public function testNestedSetParentToChild() {
  $child = $this
    ->createTestEntity(NULL);
  $child
    ->set(static::FIELD_NAME, $this->parent
    ->id());
  $child
    ->save();
  $this
    ->assertSimpleParentChild($child);
}