function CacheTest::mergeCacheContextsProvide

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Cache/CacheTest.php \Drupal\Tests\Core\Cache\CacheTest::mergeCacheContextsProvide()
  2. 11.x core/tests/Drupal/Tests/Core/Cache/CacheTest.php \Drupal\Tests\Core\Cache\CacheTest::mergeCacheContextsProvide()

Provides a list of pairs of cache contexts arrays to be merged.

Return value

array

File

core/tests/Drupal/Tests/Core/Cache/CacheTest.php, line 122

Class

CacheTest
@coversDefaultClass \Drupal\Core\Cache\Cache @group Cache

Namespace

Drupal\Tests\Core\Cache

Code

public static function mergeCacheContextsProvide() {
    return [
        [
            [],
            [],
            [],
        ],
        [
            [
                'foo',
            ],
            [],
            [
                'foo',
            ],
        ],
        [
            [
                'foo',
            ],
            [
                'foo',
            ],
            [],
        ],
        [
            [
                'bar',
                'foo',
            ],
            [
                'foo',
            ],
            [
                'bar',
            ],
        ],
        [
            [
                'bar',
                'foo',
            ],
            [
                'bar',
            ],
            [
                'foo',
            ],
        ],
        [
            [
                'foo.bar',
                'foo.foo',
            ],
            [
                'foo.foo',
            ],
            [
                'foo.bar',
            ],
        ],
        [
            [
                'foo.bar',
                'foo.foo',
            ],
            [
                'foo.bar',
            ],
            [
                'foo.foo',
            ],
        ],
        [
            [
                'bar',
                'foo',
                'llama',
            ],
            [],
            [
                'foo',
                'bar',
                'llama',
            ],
        ],
        [
            [
                'bar',
                'foo',
                'llama',
            ],
            [
                'foo',
                'bar',
                'llama',
            ],
            [],
        ],
        [
            [
                'bar',
                'foo',
                'llama',
            ],
            [
                'foo',
            ],
            [
                'foo',
                'bar',
                'llama',
            ],
        ],
        [
            [
                'bar',
                'foo',
                'llama',
            ],
            [
                'foo',
                'bar',
                'llama',
            ],
            [
                'foo',
            ],
        ],
    ];
}

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