protected function ParagraphsTestBaseTrait::addParagraphsType

Adds a Paragraphs type.

Parameters

string $paragraphs_type_name: Paragraph type name used to create.

81 calls to ParagraphsTestBaseTrait::addParagraphsType()
MultilingualBehaviorTest::setUp in paragraphs/modules/paragraphs_library/tests/src/Functional/MultilingualBehaviorTest.php
ParagraphsAccessTest::setUp in paragraphs/tests/src/Functional/WidgetStable/ParagraphsAccessTest.php
ParagraphsAccordionPluginTest::setUp in paragraphs_collection/modules/paragraphs_collection_demo/tests/src/Functional/ParagraphsAccordionPluginTest.php
ParagraphsAddModesTest::testDropDownMode in paragraphs/tests/src/Functional/WidgetStable/ParagraphsAddModesTest.php
Tests the add drop down button.
ParagraphsAddModesTest::testSelectMode in paragraphs/tests/src/Functional/WidgetStable/ParagraphsAddModesTest.php
Tests the add select mode.

... See full list

File

paragraphs/tests/src/FunctionalJavascript/ParagraphsTestBaseTrait.php, line 105

Class

ParagraphsTestBaseTrait
Test trait for Paragraphs JS tests.

Namespace

Drupal\Tests\paragraphs\FunctionalJavascript

Code

protected function addParagraphsType($paragraphs_type_name) {
  $paragraphs_type = ParagraphsType::create([
    'id' => $paragraphs_type_name,
    'label' => $paragraphs_type_name,
  ]);
  $paragraphs_type
    ->save();
}