function UnsupportedRouteAttributePropertiesTest::providerTestException

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Routing/UnsupportedRouteAttributePropertiesTest.php \Drupal\Tests\Core\Routing\UnsupportedRouteAttributePropertiesTest::providerTestException()

File

core/tests/Drupal/Tests/Core/Routing/UnsupportedRouteAttributePropertiesTest.php, line 35

Class

UnsupportedRouteAttributePropertiesTest
Tests \Drupal\Core\Routing\AttributeRouteDiscovery.

Namespace

Drupal\Tests\Core\Routing

Code

public static function providerTestException() : array {
  return [
    'method: missing_name' => [
      MethodRouteMissingName::class,
      'The Route attribute on "Drupal\\Tests\\Core\\Routing\\MethodRouteMissingName::attributeMethod()" is missing a required "name" property.',
    ],
    'method: locale' => [
      MethodRouteLocale::class,
      'The "locale" route attribute is not supported on route "MethodRouteLocale" in "Drupal\\Tests\\Core\\Routing\\MethodRouteLocale::attributeMethod()"',
    ],
    'method: localized_paths' => [
      MethodRouteLocalizedPaths::class,
      'The "path" route attribute does not support arrays on route "MethodRouteLocalizedPaths" in "Drupal\\Tests\\Core\\Routing\\MethodRouteLocalizedPaths::attributeMethod()"',
    ],
    'method: condition' => [
      MethodRouteCondition::class,
      'The "condition" route attribute is not supported on route "MethodRouteCondition" in "Drupal\\Tests\\Core\\Routing\\MethodRouteCondition::attributeMethod()"',
    ],
    'class: locale' => [
      ClassRouteLocale::class,
      'The "locale" route attribute is not supported in class "Drupal\\Tests\\Core\\Routing\\ClassRouteLocale"',
    ],
    'class: localized_paths' => [
      ClassRouteLocalizedPaths::class,
      'The "path" route attribute does not support arrays in class "Drupal\\Tests\\Core\\Routing\\ClassRouteLocalizedPaths"',
    ],
    'class: condition' => [
      ClassRouteCondition::class,
      'The "condition" route attribute is not supported in class "Drupal\\Tests\\Core\\Routing\\ClassRouteCondition"',
    ],
  ];
}

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