function EntityFormModeValidationTest::testMachineNameLength

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityFormModeValidationTest.php \Drupal\KernelTests\Core\Entity\EntityFormModeValidationTest::testMachineNameLength()

Tests that the entity ID's length is validated if it is a machine name.

Parameters

string $prefix: Prefix for machine name.

Overrides ConfigEntityValidationTestBase::testMachineNameLength

File

core/tests/Drupal/KernelTests/Core/Entity/EntityFormModeValidationTest.php, line 75

Class

EntityFormModeValidationTest
Tests validation of entity_form_mode entities.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testMachineNameLength(string $prefix = '') : void {
  // Entity form mode IDs are prefixed by an entity type ID.
  parent::testMachineNameLength('test.');
}

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