function ConfigEntityValidationTestBase::providerInvalidMachineNameCharacters

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php \Drupal\KernelTests\Core\Config\ConfigEntityValidationTestBase::providerInvalidMachineNameCharacters()

Data provider for ::testInvalidMachineNameCharacters().

Return value

array[] The test cases.

5 calls to ConfigEntityValidationTestBase::providerInvalidMachineNameCharacters()
ActionValidationTest::providerInvalidMachineNameCharacters in core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php
Action IDs are atypical in that they allow periods in the machine name.
BlockValidationTest::providerInvalidMachineNameCharacters in core/modules/block/tests/src/Kernel/BlockValidationTest.php
Block names are atypical in that they allow periods in the machine name.
MenuValidationTest::providerInvalidMachineNameCharacters in core/modules/system/tests/src/Kernel/Entity/MenuValidationTest.php
Menu IDs are atypical: they allow dashes and disallow underscores.
ShortcutSetValidationTest::providerInvalidMachineNameCharacters in core/modules/shortcut/tests/src/Kernel/ShortcutSetValidationTest.php
Shortcut set IDs are atypical: they allow dashes and disallow underscores.
TourValidationTest::providerInvalidMachineNameCharacters in core/modules/tour/tests/src/Kernel/TourValidationTest.php
Tour IDs are atypical in that they allow dashes in the machine name.
5 methods override ConfigEntityValidationTestBase::providerInvalidMachineNameCharacters()
ActionValidationTest::providerInvalidMachineNameCharacters in core/modules/system/tests/src/Kernel/Entity/ActionValidationTest.php
Action IDs are atypical in that they allow periods in the machine name.
BlockValidationTest::providerInvalidMachineNameCharacters in core/modules/block/tests/src/Kernel/BlockValidationTest.php
Block names are atypical in that they allow periods in the machine name.
MenuValidationTest::providerInvalidMachineNameCharacters in core/modules/system/tests/src/Kernel/Entity/MenuValidationTest.php
Menu IDs are atypical: they allow dashes and disallow underscores.
ShortcutSetValidationTest::providerInvalidMachineNameCharacters in core/modules/shortcut/tests/src/Kernel/ShortcutSetValidationTest.php
Shortcut set IDs are atypical: they allow dashes and disallow underscores.
TourValidationTest::providerInvalidMachineNameCharacters in core/modules/tour/tests/src/Kernel/TourValidationTest.php
Tour IDs are atypical in that they allow dashes in the machine name.

File

core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php, line 137

Class

ConfigEntityValidationTestBase
Base class for testing validation of config entities.

Namespace

Drupal\KernelTests\Core\Config

Code

public static function providerInvalidMachineNameCharacters() : array {
    return [
        'INVALID: space separated' => [
            'space separated',
            FALSE,
        ],
        'INVALID: dash separated' => [
            'dash-separated',
            FALSE,
        ],
        'INVALID: uppercase letters' => [
            'Uppercase_Letters',
            FALSE,
        ],
        'INVALID: period separated' => [
            'period.separated',
            FALSE,
        ],
        'VALID: underscore separated' => [
            'underscore_separated',
            TRUE,
        ],
    ];
}

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