protected function ParagraphsTestBaseTrait::addParagraphsType in Paragraphs 8
Adds a Paragraphs type.
Parameters
string $paragraphs_type_name: Paragraph type name used to create.
65 calls to ParagraphsTestBaseTrait::addParagraphsType()
- MultilingualBehaviorTest::setUp in modules/
paragraphs_library/ tests/ src/ Functional/ MultilingualBehaviorTest.php - ParagraphsAccessTest::setUp in tests/
src/ Functional/ WidgetStable/ ParagraphsAccessTest.php - ParagraphsAddModesTest::testDropDownMode in tests/
src/ Functional/ WidgetStable/ ParagraphsAddModesTest.php - Tests the add drop down button.
- ParagraphsAddModesTest::testSelectMode in tests/
src/ Functional/ WidgetStable/ ParagraphsAddModesTest.php - Tests the add select mode.
- ParagraphsAddWidgetTest::testAddWidgetButton in tests/
src/ FunctionalJavascript/ ParagraphsAddWidgetTest.php - Tests the add widget button with modal form.
File
- tests/
src/ FunctionalJavascript/ ParagraphsTestBaseTrait.php, line 105
Class
- ParagraphsTestBaseTrait
- Test trait for Paragraphs JS tests.
Namespace
Drupal\Tests\paragraphs\FunctionalJavascriptCode
protected function addParagraphsType($paragraphs_type_name) {
$paragraphs_type = ParagraphsType::create([
'id' => $paragraphs_type_name,
'label' => $paragraphs_type_name,
]);
$paragraphs_type
->save();
}