function ActionValidationTest::testLabelValidation

Tests validation of config entity's label.

Overrides ConfigEntityValidationTestBase::testLabelValidation

File

core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php, line 77

Class

ActionValidationTest
Tests validation of action entities.

Namespace

Drupal\Tests\system\Kernel\Entity

Code

public function testLabelValidation() : void {
  static::setLabel($this->entity, "Multi\nLine");
  $this->assertValidationErrors([
    'label' => "Labels are not allowed to span multiple lines or contain control characters.",
  ]);
}

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