function 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.