function CKEditor5ToolbarTest::setUp
Same name in other branches
- 9 core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5ToolbarTest::setUp()
- 10 core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php \Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5ToolbarTest::setUp()
Overrides BrowserTestBase::setUp
File
-
core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5ToolbarTest.php, line 46
Class
- CKEditor5ToolbarTest
- Tests for CKEditor 5 editor UI with Toolbar module.
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
protected function setUp() : void {
parent::setUp();
FilterFormat::create([
'format' => 'test_format',
'name' => 'Test format',
'filters' => [],
])->save();
Editor::create([
'editor' => 'ckeditor5',
'format' => 'test_format',
'image_upload' => [
'status' => FALSE,
],
'settings' => [],
])->save();
$this->assertSame([], array_map(function (ConstraintViolationInterface $v) {
return (string) $v->getMessage();
}, iterator_to_array(CKEditor5::validatePair(Editor::load('test_format'), FilterFormat::load('test_format')))));
$this->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
$this->user = $this->drupalCreateUser([
'use text format test_format',
'access toolbar',
'edit any article content',
'administer site configuration',
]);
$this->drupalLogin($this->user);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.