function CookieCacheContextTest::providerTestGetContext
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php \Drupal\Tests\Core\Cache\Context\CookieCacheContextTest::providerTestGetContext()
- 11.x core/tests/Drupal/Tests/Core/Cache/Context/CookieCacheContextTest.php \Drupal\Tests\Core\Cache\Context\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 @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.