function MemoryBackendTest::setUp
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Flood/ MemoryBackendTest.php, line 25
Class
- MemoryBackendTest
- Tests the memory flood implementation.
Namespace
Drupal\Tests\Core\FloodCode
protected function setUp() : void {
$request = new RequestStack();
$request_mock = $this->getMockBuilder(Request::class)
->onlyMethods([
'getClientIp',
])
->getMock();
$request->push($request_mock);
$this->flood = new MemoryBackend($request);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.