You are here

public function ModuleRouteSubscriberTest::providerTestRemoveRoute in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\ModuleRouteSubscriberTest::providerTestRemoveRoute()
  2. 10 core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\ModuleRouteSubscriberTest::providerTestRemoveRoute()

Data provider for testRemoveRoute().

File

core/tests/Drupal/Tests/Core/EventSubscriber/ModuleRouteSubscriberTest.php, line 70

Class

ModuleRouteSubscriberTest
@coversDefaultClass \Drupal\Core\EventSubscriber\ModuleRouteSubscriber @group EventSubscriber

Namespace

Drupal\Tests\Core\EventSubscriber

Code

public function providerTestRemoveRoute() {
  return [
    [
      'enabled',
      [
        '_module_dependencies' => 'enabled',
      ],
      FALSE,
    ],
    [
      'disabled',
      [
        '_module_dependencies' => 'disabled',
      ],
      TRUE,
    ],
    [
      'enabled_or',
      [
        '_module_dependencies' => 'disabled,enabled',
      ],
      FALSE,
    ],
    [
      'enabled_or',
      [
        '_module_dependencies' => 'enabled,disabled',
      ],
      FALSE,
    ],
    [
      'disabled_or',
      [
        '_module_dependencies' => 'disabled,disabled',
      ],
      TRUE,
    ],
    [
      'enabled_and',
      [
        '_module_dependencies' => 'enabled+enabled',
      ],
      FALSE,
    ],
    [
      'enabled_and',
      [
        '_module_dependencies' => 'enabled+disabled',
      ],
      TRUE,
    ],
    [
      'enabled_and',
      [
        '_module_dependencies' => 'disabled+enabled',
      ],
      TRUE,
    ],
    [
      'disabled_and',
      [
        '_module_dependencies' => 'disabled+disabled',
      ],
      TRUE,
    ],
    [
      'no_dependencies',
      [],
      FALSE,
    ],
  ];
}