You are here

public function CacheTest::mergeCacheContextsProvide in Drupal 9

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 117

Class

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

Namespace

Drupal\Tests\Core\Cache

Code

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