$this->
assertEquals(CommentItemInterface::OPEN,
$translation->comment_node_article->status
);
$this->
assertEquals('Home',
$translation->field_link->title
);
$term_ref =
$translation->
get('field_vocab_localize'
)->target_id;
$this->
assertSame('20',
$term_ref);
$this->
assertSame('DS9', Term::
load($term_ref)->
getName());
$term_ref =
$translation->
get('field_vocab_translate'
)->target_id;
$this->
assertSame('23',
$term_ref);
$this->
assertSame('is - High council', Term::
load($term_ref)->
getName());
$term_ref =
$translation->
get('field_vocab_fixed'
)->target_id;
$this->
assertNulL($term_ref);
// Test that content_translation_source is set.
$manager =
$this->container->
get('content_translation.manager'
);
$this->
assertEquals('en',
$manager->
getTranslationMetadata($node->
getTranslation('is'
))->
getSource());
// Node 3 is a translation of node 2, and should not be imported separately.
$this->
assertNull(Node::
load(3
), "Node 3 doesn't exist in D8, it was a translation"
);
// Test that content_translation_source for a source other than English.
$node = Node::
load(4
);
$this->
assertEquals('is',
$manager->
getTranslationMetadata($node->
getTranslation('en'
))->
getSource());