$node = Node::
load(6
);
$this->
assertEquals(CommentItemInterface::CLOSED,
$node->comment_forum->status
);
$node = Node::
load(7
);
$this->
assertEquals(CommentItemInterface::OPEN,
$node->comment_forum->status
);
// Test synchronized field.
$value = 'Kai Opaka';
$node = Node::
load(2
);
$this->
assertSame($value,
$node->field_text_plain->value
);
$this->
assertArrayNotHasKey('field_text_plain',
$node->
getTranslatableFields());
$node =
$node->
getTranslation('is'
);
$this->
assertSame($value,
$node->field_text_plain->value
);
// Tests node entity translations migration from Drupal 7 to 8.
$manager =
$this->container->
get('content_translation.manager'
);
// Get the node and its translations.
$node = Node::
load(1
);
$node_fr =
$node->
getTranslation('fr'
);
$node_is =
$node->
getTranslation('is'
);