function EditorValidationTest::testInvalidPluginId

Same name in other branches
  1. 10 core/modules/editor/tests/src/Kernel/EditorValidationTest.php \Drupal\Tests\editor\Kernel\EditorValidationTest::testInvalidPluginId()

Tests validating an editor with an unknown plugin ID.

File

core/modules/editor/tests/src/Kernel/EditorValidationTest.php, line 108

Class

EditorValidationTest
Tests validation of editor entities.

Namespace

Drupal\Tests\editor\Kernel

Code

public function testInvalidPluginId() : void {
    $this->entity
        ->setEditor('non_existent');
    $this->assertValidationErrors([
        'editor' => "The 'non_existent' plugin does not exist.",
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.