X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FExperimental%2FParagraphsExperimentalTypesTest.php;fp=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FExperimental%2FParagraphsExperimentalTypesTest.php;h=0000000000000000000000000000000000000000;hp=e02520fdcf24d143a71d222bdde78d176d515fda;hb=059867c3f96750652c80f39e44c442a58c2549ee;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2 diff --git a/web/modules/contrib/paragraphs/src/Tests/Experimental/ParagraphsExperimentalTypesTest.php b/web/modules/contrib/paragraphs/src/Tests/Experimental/ParagraphsExperimentalTypesTest.php deleted file mode 100644 index e02520fdc..000000000 --- a/web/modules/contrib/paragraphs/src/Tests/Experimental/ParagraphsExperimentalTypesTest.php +++ /dev/null @@ -1,63 +0,0 @@ -loginAsAdmin(); - // Add a Paragraphed test content. - $this->addParagraphedContentType('paragraphed_test', 'paragraphs'); - - $this->addParagraphsType('paragraph_type_test'); - $this->addParagraphsType('text'); - - // Attempt to delete the content type not used yet. - $this->drupalGet('admin/structure/paragraphs_type'); - $this->clickLink(t('Delete')); - $this->assertText('This action cannot be undone.'); - $this->clickLink(t('Cancel')); - - // Add a test node with a Paragraph. - $this->drupalGet('node/add/paragraphed_test'); - $this->drupalPostAjaxForm(NULL, [], 'paragraphs_paragraph_type_test_add_more'); - $edit = ['title[0][value]' => 'test_node']; - $this->drupalPostForm(NULL, $edit, t('Save')); - $this->assertText('paragraphed_test test_node has been created.'); - - // Attempt to delete the paragraph type already used. - $this->drupalGet('admin/structure/paragraphs_type'); - $this->clickLink(t('Delete')); - $this->assertText('paragraph_type_test Paragraphs type is used by 1 piece of content on your site. You can not remove this paragraph_type_test Paragraphs type until you have removed all from the content.'); - } - - /** - * Tests creating paragraph type. - */ - public function testCreateParagraphType() { - $this->loginAsAdmin(); - - // Add a paragraph type. - $this->drupalGet('/admin/structure/paragraphs_type/add'); - - // Create a paragraph type with label and id more than 32 characters. - $edit = [ - 'label' => 'Test', - 'id' => 'test_name_with_more_than_32_characters' - ]; - $this->drupalPostForm(NULL, $edit, 'Save and manage fields'); - $this->assertNoErrorsLogged(); - $this->assertText('Machine-readable name cannot be longer than 32 characters but is currently 38 characters long.'); - $edit['id'] = 'new_test_id'; - $this->drupalPostForm(NULL, $edit, 'Save and manage fields'); - $this->assertText('Saved the Test Paragraphs type.'); - } -}