function MemoryBackendTest::testNotAllowedProceeding
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest::testNotAllowedProceeding()
- 11.x core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest::testNotAllowedProceeding()
Tests a flood event with more than the allowed calls.
File
-
core/
tests/ Drupal/ Tests/ Core/ Flood/ MemoryBackendTest.php, line 52
Class
- MemoryBackendTest
- Tests the memory flood implementation.
Namespace
Drupal\Tests\Core\FloodCode
public function testNotAllowedProceeding() : void {
$threshold = 1;
$window_expired = -1;
// Register the event twice, so it is not allowed to proceed.
$this->flood
->register('test_event', $window_expired);
$this->flood
->register('test_event', $window_expired, 1);
$this->assertFalse($this->flood
->isAllowed('test_event', $threshold));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.