function CookieCacheContextTest::providerTestGetContext
Provides a list of cookies and expected cache contexts.
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ CookieCacheContextTest.php, line 35  
Class
- CookieCacheContextTest
 - @coversDefaultClass \Drupal\Core\Cache\Context\CookiesCacheContext[[api-linebreak]] @group Cache
 
Namespace
Drupal\Tests\Core\Cache\ContextCode
public function providerTestGetContext() {
  return [
    [
      [
        'foo' => 1,
        'bar' => 2,
        'baz' => 3,
      ],
      'foo',
      1,
    ],
    // Context is ordered by cookie name.
[
      [
        'foo' => 1,
        'bar' => 2,
        'baz' => 3,
      ],
      NULL,
      'bar=2&baz=3&foo=1',
    ],
  ];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.