Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / paragraphs / src / Tests / Experimental / ParagraphsExperimentalAddModesTest.php
index 1e53d1b5fa0315f20fd7419aab22a1a5e552d80a..7ee5c5e96e7815e26c43c05007e3fed1b77809e4 100644 (file)
@@ -19,30 +19,30 @@ class ParagraphsExperimentalAddModesTest extends ParagraphsExperimentalTestBase
    */
   public function testNoDefaultValue() {
     $this->loginAsAdmin();
-    $this->addParagraphedContentType('paragraphed_test', 'paragraphs_field');
+    $this->addParagraphedContentType('paragraphed_test');
     // Edit the field.
     $this->drupalGet('admin/structure/types/manage/paragraphed_test/fields');
     $this->clickLink(t('Edit'));
 
     // Check that the current field does not allow to add default values.
-    $this->assertText('No widget available for: paragraphs_field.');
+    $this->assertText('No widget available for: field_paragraphs.');
     $this->drupalPostForm(NULL, [], t('Save settings'));
-    $this->assertText('Saved paragraphs_field configuration.');
+    $this->assertText('Saved field_paragraphs configuration.');
     $this->assertResponse(200);
   }
 
   /**
-   * Tests the field creation when no paragraphs types are available.
+   * Tests the field creation when no Paragraphs types are available.
    */
   public function testEmptyAllowedTypes() {
     $this->loginAsAdmin();
-    $this->addParagraphedContentType('paragraphed_test', 'paragraphs');
+    $this->addParagraphedContentType('paragraphed_test');
 
-    // Edit the field and save when there are no paragraphs types available.
+    // Edit the field and save when there are no Paragraphs types available.
     $this->drupalGet('admin/structure/types/manage/paragraphed_test/fields');
     $this->clickLink(t('Edit'));
     $this->drupalPostForm(NULL, [], t('Save settings'));
-    $this->assertText('Saved paragraphs configuration.');
+    $this->assertText('Saved field_paragraphs configuration.');
   }
 
   /**
@@ -50,7 +50,7 @@ class ParagraphsExperimentalAddModesTest extends ParagraphsExperimentalTestBase
    */
   public function testDropDownMode() {
     $this->loginAsAdmin();
-    // Add two paragraph types.
+    // Add two Paragraph types.
     $this->addParagraphsType('btext');
     $this->addParagraphsType('dtext');
 
@@ -84,7 +84,7 @@ class ParagraphsExperimentalAddModesTest extends ParagraphsExperimentalTestBase
    */
   public function testSelectMode() {
     $this->loginAsAdmin();
-    // Add two paragraph types.
+    // Add two Paragraph types.
     $this->addParagraphsType('btext');
     $this->addParagraphsType('dtext');
 
@@ -188,7 +188,8 @@ class ParagraphsExperimentalAddModesTest extends ParagraphsExperimentalTestBase
     // Check if default type is created only for new host
     $this->setDefaultParagraphType('paragraphed_test', 'paragraphs', 'paragraphs_settings_edit', 'text_image');
     $this->removeDefaultParagraphType('paragraphed_test');
-    $this->drupalPostForm(NULL, ['title[0][value]' => 'New Host'], 'Save and publish');
+    $edit = ['title[0][value]' => 'New Host'];
+    $this->drupalPostForm(NULL, $edit, t('Save'));
     $this->drupalGet('node/1/edit');
     $this->assertText('No Paragraph added yet.');
   }