Verified Commit 3fd3ac2e authored by godotislate's avatar godotislate
Browse files

fix: #3507570 Use expectExceptionMessage()

By: mcdruid
parent 3ecdc936
Loading
Loading
Loading
Loading
Loading
+3 −3
Changes for core/modules/ckeditor5/tests/src/Kernel/ConfigAction/AddItemToToolbarConfigActionTest.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ public function testAddMultipleItemsToToolbar(): void {
   */
  public function testEmptyItemListIsRejected(): void {
    $this->expectException(ConfigActionException::class);
    $this->expectExceptionMessageIs('The editor:addItemsToToolbar config action requires one or more toolbar items.');
    $this->expectExceptionMessage('The editor:addItemsToToolbar config action requires one or more toolbar items.');
    $this->container->get('plugin.manager.config_action')
      ->applyAction('editor:addItemsToToolbar', 'editor.editor.filter_test', []);
  }
@@ -153,7 +153,7 @@ public function testEmptyItemListIsRejected(): void {
   */
  public function testInvalidItemTypeIsRejected(): void {
    $this->expectException(ConfigActionException::class);
    $this->expectExceptionMessageIs('The editor:addItemsToToolbar config action requires each toolbar item to be a string or an array of options.');
    $this->expectExceptionMessage('The editor:addItemsToToolbar config action requires each toolbar item to be a string or an array of options.');
    $this->container->get('plugin.manager.config_action')
      ->applyAction('editor:addItemsToToolbar', 'editor.editor.filter_test', [123]);
  }
@@ -163,7 +163,7 @@ public function testInvalidItemTypeIsRejected(): void {
   */
  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->expectExceptionMessage("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]]);
  }