function ImageUploadTest::createBasicFormat
Same name and namespace in other branches
- 11.x core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php \Drupal\Tests\ckeditor5\Functional\ImageUploadTest::createBasicFormat()
- 10 core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php \Drupal\Tests\ckeditor5\Functional\ImageUploadTest::createBasicFormat()
Create a basic_html text format for the editor to reference.
Throws
\Drupal\Core\Entity\EntityStorageException
File
-
core/
modules/ ckeditor5/ tests/ src/ Functional/ ImageUploadTest.php, line 193
Class
- ImageUploadTest
- Test image upload.
Namespace
Drupal\Tests\ckeditor5\FunctionalCode
protected function createBasicFormat() {
$basic_html_format = FilterFormat::create([
'format' => 'basic_html',
'name' => 'Basic HTML',
'weight' => 1,
'filters' => [
'filter_html_escape' => [
'status' => 1,
],
],
'roles' => [
RoleInterface::AUTHENTICATED_ID,
],
]);
$basic_html_format->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.