public function ParagraphsTypesTest::testCreateParagraphType

Same name in this branch
  1. 8.x-1.x paragraphs_collection/tests/src/Functional/ParagraphsTypesTest.php \Drupal\Tests\paragraphs_collection\Functional\ParagraphsTypesTest::testCreateParagraphType()
  2. 8.x-1.x paragraphs/tests/src/Functional/WidgetStable/ParagraphsTypesTest.php \Drupal\Tests\paragraphs\Functional\WidgetStable\ParagraphsTypesTest::testCreateParagraphType()

Ensures that a new paragraph type is created.

File

paragraphs_collection/tests/src/Functional/ParagraphsTypesTest.php, line 87

Class

ParagraphsTypesTest
Tests the Paragraphs Collection paragraph types.

Namespace

Drupal\Tests\paragraphs_collection\Functional

Code

public function testCreateParagraphType() {
  $this
    ->loginAsAdmin();
  $this
    ->drupalGet('/admin/structure/paragraphs_type');
  $this
    ->clickLink(t('Add paragraph type'));
  $edit = [
    'label' => 'test_paragraph',
    'id' => 'test_paragraph',
  ];
  $this
    ->submitForm($edit, t('Save and manage fields'));
  $this
    ->assertSession()
    ->pageTextContains('Saved the test_paragraph Paragraphs type');
}