function EntityFormModeValidationTest::providerInvalidMachineNameCharacters

Data provider for ::testInvalidMachineNameCharacters().

Return value

array[] The test cases.

Overrides ConfigEntityValidationTestBase::providerInvalidMachineNameCharacters

File

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

Class

EntityFormModeValidationTest
Tests validation of entity_form_mode entities.

Namespace

Drupal\KernelTests\Core\Entity

Code

public static function providerInvalidMachineNameCharacters() : array {
  return [
    'INVALID: contains a space' => [
      'prefix.space separated',
      FALSE,
    ],
    'INVALID: dash separated' => [
      'prefix.dash-separated',
      FALSE,
    ],
    'INVALID: uppercase letters' => [
      'Uppercase.Letters',
      FALSE,
    ],
    'VALID: underscore separated' => [
      'prefix.underscore_separated',
      TRUE,
    ],
    'VALID: contains numbers' => [
      'prefix1.part2',
      TRUE,
    ],
  ];
}

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