function PathParentCacheContextTest::providerTestGetContext
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php \Drupal\Tests\Core\Cache\Context\PathParentCacheContextTest::providerTestGetContext()
- 10 core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php \Drupal\Tests\Core\Cache\Context\PathParentCacheContextTest::providerTestGetContext()
- 11.x core/tests/Drupal/Tests/Core/Cache/Context/PathParentCacheContextTest.php \Drupal\Tests\Core\Cache\Context\PathParentCacheContextTest::providerTestGetContext()
Provides a list of paths and expected cache contexts.
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ PathParentCacheContextTest.php, line 32
Class
- PathParentCacheContextTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Cache%21Context%21PathParentCacheContext.php/class/PathParentCacheContext/9" title="Defines a cache context service for path parents." class="local">\Drupal\Core\Cache\Context\PathParentCacheContext</a> @group Cache
Namespace
Drupal\Tests\Core\Cache\ContextCode
public function providerTestGetContext() {
return [
[
'/some/path',
'some',
],
[
'/some/other-path',
'some',
],
[
'/some/other/path',
'some/other',
],
[
'/some/other/path?q=foo&b=bar',
'some/other',
],
[
'/some',
'',
],
[
'/',
'',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.