function ModuleRouteSubscriberTest::providerTestRemoveRoute

Same name in other branches
  1. 8.9.x 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()
  3. 11.x 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 73

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,
        ],
    ];
}

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