function ExceptionStatusCodeCacheContextTest::providerTestGetContext
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Cache/Context/ExceptionStatusCodeCacheContextTest.php \Drupal\Tests\Core\Cache\Context\ExceptionStatusCodeCacheContextTest::providerTestGetContext()
Provides a list of cookies and expected cache contexts.
File
-
core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ ExceptionStatusCodeCacheContextTest.php, line 44
Class
Namespace
Drupal\Tests\Core\Cache\ContextCode
public static function providerTestGetContext() : array {
return [
[
new NotFoundHttpException(),
'404',
],
[
new AccessDeniedHttpException(),
'403',
],
[
new BadRequestHttpException(),
'400',
],
[
new MethodNotAllowedHttpException([
'POST',
]),
'405',
],
[
NULL,
'0',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.