protected function ParagraphsFeaturesJavascriptTestBase::createEditor in Paragraphs Features 2.x
Same name and namespace in other branches
- 8 tests/src/FunctionalJavascript/ParagraphsFeaturesJavascriptTestBase.php \Drupal\Tests\paragraphs_features\FunctionalJavascript\ParagraphsFeaturesJavascriptTestBase::createEditor()
Create CKEditor for testing of CKEditor integration.
2 calls to ParagraphsFeaturesJavascriptTestBase::createEditor()
- ParagraphsFeaturesDeleteConfirmationTest::testCkEditorAfterCancel in tests/
src/ FunctionalJavascript/ ParagraphsFeaturesDeleteConfirmationTest.php - This is test mainly to cover problem with initialization of CKEditor.
- ParagraphsFeaturesSplitTextTest::testSplitTextFeature in tests/
src/ FunctionalJavascript/ ParagraphsFeaturesSplitTextTest.php - Test split text feature.
File
- tests/
src/ FunctionalJavascript/ ParagraphsFeaturesJavascriptTestBase.php, line 129
Class
- ParagraphsFeaturesJavascriptTestBase
- Base class for Javascript tests for paragraphs features module.
Namespace
Drupal\Tests\paragraphs_features\FunctionalJavascriptCode
protected function createEditor() {
// Create a text format and associate CKEditor.
$filtered_html_format = FilterFormat::create([
'format' => 'filtered_html',
'name' => 'Filtered HTML',
'weight' => 0,
]);
$filtered_html_format
->save();
Editor::create([
'format' => 'filtered_html',
'editor' => 'ckeditor',
])
->save();
// After createTestConfiguration, $this->admin_user will be created by
// LoginAdminTrait used in base class.
$this->admin_user
->addRole($this
->createRole([
'use text format filtered_html',
]));
$this->admin_user
->save();
}