]);
$node->save();
- $node_fr = $node->addTranslation('fr');
+ $node_fr = $node->addTranslation('fr', $node->toArray());
$node_fr->setTitle('French Published Node');
$node_fr->save();
$this->assertEquals('published', $node_fr->moderation_state->value);
$this->assertCount(0, $violations);
// From the latest french revision, there should also be no violation.
- $node_fr = $node->getTranslation('fr');
+ $node_fr = Node::load($node->id())->getTranslation('fr');
$this->assertEquals('published', $node_fr->moderation_state->value);
$node_fr->moderation_state = 'archived';
$violations = $node_fr->validate();
/**
* Tests that content without prior moderation information can be moderated.
*/
- public function testLegacyContent() {
+ public function testExistingContentWithNoModeration() {
$node_type = NodeType::create([
'type' => 'example',
]);
/**
* Tests that content without prior moderation information can be translated.
*/
- public function testLegacyMultilingualContent() {
+ public function testExistingMultilingualContentWithNoModeration() {
// Enable French.
ConfigurableLanguage::createFromLangcode('fr')->save();