X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FExperimental%2FParagraphsExperimentalEntityTranslationWithNonTranslatableParagraphs.php;fp=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FExperimental%2FParagraphsExperimentalEntityTranslationWithNonTranslatableParagraphs.php;h=0000000000000000000000000000000000000000;hb=059867c3f96750652c80f39e44c442a58c2549ee;hp=247ebf9e8d57a53eec30abb6b15b7ee4163a805b;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2;p=yaffs-website diff --git a/web/modules/contrib/paragraphs/src/Tests/Experimental/ParagraphsExperimentalEntityTranslationWithNonTranslatableParagraphs.php b/web/modules/contrib/paragraphs/src/Tests/Experimental/ParagraphsExperimentalEntityTranslationWithNonTranslatableParagraphs.php deleted file mode 100644 index 247ebf9e8..000000000 --- a/web/modules/contrib/paragraphs/src/Tests/Experimental/ParagraphsExperimentalEntityTranslationWithNonTranslatableParagraphs.php +++ /dev/null @@ -1,109 +0,0 @@ -admin_user = $this->drupalCreateUser([], NULL, TRUE); - $this->drupalLogin($this->admin_user); - - // Add a languages. - $edit = array( - 'predefined_langcode' => 'de', - ); - $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language')); - $edit = array( - 'predefined_langcode' => 'fr', - ); - $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language')); - - // Create article content type with a paragraphs field. - $this->addParagraphedContentType('article', 'field_paragraphs'); - $this->drupalGet('admin/structure/types/manage/article'); - // Make content type translatable. - $edit = array( - 'language_configuration[content_translation]' => TRUE, - ); - $this->drupalPostForm('admin/structure/types/manage/article', $edit, t('Save content type')); - $this->drupalGet('admin/structure/types/manage/article'); - - // Ensue the paragraphs field itself isn't translatable - this would be a - // currently not supported configuration otherwise. - $edit = array( - 'translatable' => FALSE, - ); - $this->drupalPostForm('admin/structure/types/manage/article/fields/node.article.field_paragraphs', $edit, t('Save settings')); - - // Add Paragraphs type. - $this->addParagraphsType('test_paragraph_type'); - // Configure Paragraphs type. - static::fieldUIAddNewField('admin/structure/paragraphs_type/test_paragraph_type', 'text', 'Text', 'string', [ - 'cardinality' => '-1', - ]); - - // Just for verbose-sake - check the content language settings. - $this->drupalGet('admin/config/regional/content-language'); - } - - /** - * Tests the revision of paragraphs. - */ - public function testParagraphsIEFTranslation() { - $this->drupalLogin($this->admin_user); - - // Create node with one paragraph. - $this->drupalGet('node/add/article'); - - // Set the values and save. - $edit = [ - 'title[0][value]' => 'Title English', - ]; - $this->drupalPostForm(NULL, $edit, t('Save')); - - // Add french translation. - $this->clickLink(t('Translate')); - $this->clickLink(t('Add'), 1); - // Make sure that the original paragraph text is displayed. - $this->assertText('Title English'); - - $edit = array( - 'title[0][value]' => 'Title French', - ); - $this->drupalPostForm(NULL, $edit, t('Save (this translation)')); - $this->assertText('article Title French has been updated.'); - - // Add german translation. - $this->clickLink(t('Translate')); - $this->clickLink(t('Add')); - // Make sure that the original paragraph text is displayed. - $this->assertText('Title English'); - - $edit = array( - 'title[0][value]' => 'Title German', - ); - $this->drupalPostForm(NULL, $edit, t('Save (this translation)')); - $this->assertText('article Title German has been updated.'); - } - -}