function FloodTest::floodBackendProvider
Same name in other branches
- 10 core/modules/system/tests/src/Kernel/System/FloodTest.php \Drupal\Tests\system\Kernel\System\FloodTest::floodBackendProvider()
Provides an array of backends for testClearByPrefix.
1 call to FloodTest::floodBackendProvider()
- FloodTest::testClearByPrefix in core/
modules/ system/ tests/ src/ Kernel/ System/ FloodTest.php - Tests clearByPrefix method on flood backends.
File
-
core/
modules/ system/ tests/ src/ Kernel/ System/ FloodTest.php, line 85
Class
- FloodTest
- Functional tests for the flood control mechanism.
Namespace
Drupal\Tests\system\Kernel\SystemCode
public function floodBackendProvider() : array {
$request_stack = \Drupal::service('request_stack');
$connection = \Drupal::service('database');
$time = \Drupal::service(TimeInterface::class);
return [
new MemoryBackend($request_stack),
new DatabaseBackend($connection, $request_stack, $time),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.