function AllowToolbarPathTest::providerTestAllowToolbarPath

Same name in other branches
  1. 9 core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest::providerTestAllowToolbarPath()
  2. 8.9.x core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest::providerTestAllowToolbarPath()
  3. 11.x core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest::providerTestAllowToolbarPath()

Provides data and expected results for the test method.

Return value

array Data and expected results.

File

core/modules/toolbar/tests/src/Unit/PageCache/AllowToolbarPathTest.php, line 52

Class

AllowToolbarPathTest
@coversDefaultClass \Drupal\toolbar\PageCache\AllowToolbarPath @group toolbar

Namespace

Drupal\Tests\toolbar\Unit\PageCache

Code

public static function providerTestAllowToolbarPath() {
    return [
        [
            NULL,
            '/',
        ],
        [
            NULL,
            '/other-path?q=/toolbar/subtrees/',
        ],
        [
            NULL,
            '/toolbar/subtrees/',
        ],
        [
            NULL,
            '/toolbar/subtrees/some-hash/langcode/additional-stuff',
        ],
        [
            RequestPolicyInterface::ALLOW,
            '/de/toolbar/subtrees/abcd',
        ],
        [
            RequestPolicyInterface::ALLOW,
            '/en-us/toolbar/subtrees/xyz',
        ],
        [
            RequestPolicyInterface::ALLOW,
            '/en-us/toolbar/subtrees/xyz/de',
        ],
        [
            RequestPolicyInterface::ALLOW,
            '/a/b/c/toolbar/subtrees/xyz/de',
        ],
        [
            RequestPolicyInterface::ALLOW,
            '/toolbar/subtrees/some-hash',
        ],
        [
            RequestPolicyInterface::ALLOW,
            '/toolbar/subtrees/some-hash/en',
        ],
    ];
}

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