I would like to create a node of an existing content type and translate it. This is the code I’m using with weitzmanDrupalTestTraitsExistingSiteBase but the node is not translated.
<?php namespace DrupalTeststranslationFunctional; use weitzmanDrupalTestTraitsExistingSiteBase; /** * Tests the Node Translation UI. * * @group node */ class TranslationTextLiveTest extends ExistingSiteBase { /** * Tests translation functionality. */ public function testTranslationtext() { $original_node = $this->createNode([ 'type' => 'article_research', 'title' => 'Test English', 'body' => ['value' => '<p>This is english text</p>', 'format' => 'html'], ]); $original_node->save(); $translation_node = $original_node->addTranslation('es'); $translation_node->setTitle('Spanish'); $translation_node->setNewRevision(); $translation_node->save(); } }