function EntityConverterTest::providerTestGetRouteRequirement

Provides test data for testGetRouteRequirement().

File

core/tests/Drupal/Tests/Core/ParamConverter/EntityConverterTest.php, line 302

Class

EntityConverterTest
Tests Drupal\Core\ParamConverter\EntityConverter.

Namespace

Drupal\Tests\Core\ParamConverter

Code

public static function providerTestGetRouteRequirement() : array {
  return [
    'config entity returns printable ASCII regex' => [
      [
        'type' => 'entity:config_test',
      ],
      '[\\x20-\\x7E]+',
    ],
    'content entity returns NULL' => [
      [
        'type' => 'entity:entity_test',
      ],
      NULL,
    ],
    'dynamic entity type returns NULL' => [
      [
        'type' => 'entity:{entity_type}',
      ],
      NULL,
    ],
  ];
}

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