function MemoryBackendTest::setUp
Same name in other branches
- 9 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 27
Class
- MemoryBackendTest
- Tests the memory flood implementation.
Namespace
Drupal\Tests\Core\FloodCode
protected function setUp() : void {
parent::setUp();
$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.