function AddItemToToolbarConfigActionTest::testMissingItemNameIsRejected
Same name and namespace in other branches
- 11.x core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php \Drupal\Tests\ckeditor5\Kernel\ConfigAction\AddItemToToolbarConfigActionTest::testMissingItemNameIsRejected()
Tests that a toolbar item without an item name is rejected.
File
-
core/
modules/ ckeditor5/ tests/ src/ Kernel/ ConfigAction/ AddItemToToolbarConfigActionTest.php, line 164
Class
- AddItemToToolbarConfigActionTest
- Tests add item to toolbar config action.
Namespace
Drupal\Tests\ckeditor5\Kernel\ConfigActionCode
public function testMissingItemNameIsRejected() : void {
$this->expectException(ConfigActionException::class);
$this->expectExceptionMessageIs("The editor:addItemsToToolbar config action requires each toolbar item to define an 'item_name' string.");
$this->container
->get('plugin.manager.config_action')
->applyAction('editor:addItemsToToolbar', 'editor.editor.filter_test', [
[
'position' => 0,
],
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.