function TrustedRedirectResponseTest::providerCreateFromRedirectResponse
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php \Drupal\Tests\Core\Routing\TrustedRedirectResponseTest::providerCreateFromRedirectResponse()
- 9 core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php \Drupal\Tests\Core\Routing\TrustedRedirectResponseTest::providerCreateFromRedirectResponse()
- 8.9.x core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php \Drupal\Tests\Core\Routing\TrustedRedirectResponseTest::providerCreateFromRedirectResponse()
Return value
array An array of test cases, each containing a redirect response instance.
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ TrustedRedirectResponseTest.php, line 92
Class
Namespace
Drupal\Tests\Core\RoutingCode
public static function providerCreateFromRedirectResponse() : array {
return [
'cacheable-with-tags' => [
(new CacheableRedirectResponse('/example'))->addCacheableDependency((new CacheableMetadata())->addCacheTags([
'foo',
])),
],
'cacheable-with-max-age-0' => [
(new CacheableRedirectResponse('/example'))->addCacheableDependency((new CacheableMetadata())->setCacheMaxAge(0)),
],
'uncacheable' => [
new RedirectResponse('/example'),
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.