function EditorValidationTest::testInvalidFormat
Same name in other branches
- 10 core/modules/editor/tests/src/Kernel/EditorValidationTest.php \Drupal\Tests\editor\Kernel\EditorValidationTest::testInvalidFormat()
Tests validating an editor with a non-existent `format`.
File
-
core/
modules/ editor/ tests/ src/ Kernel/ EditorValidationTest.php, line 116
Class
- EditorValidationTest
- Tests validation of editor entities.
Namespace
Drupal\Tests\editor\KernelCode
public function testInvalidFormat() : void {
$this->entity
->set('format', 'non_existent');
$this->assertValidationErrors([
'' => "The 'format' property cannot be changed.",
'format' => "The 'filter.format.non_existent' config does not exist.",
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.