function MemoryBackendTest::testAllowedProceeding

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest::testAllowedProceeding()
  2. 11.x core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php \Drupal\Tests\Core\Flood\MemoryBackendTest::testAllowedProceeding()

Tests an allowed flood event.

File

core/tests/Drupal/Tests/Core/Flood/MemoryBackendTest.php, line 37

Class

MemoryBackendTest
Tests the memory flood implementation.

Namespace

Drupal\Tests\Core\Flood

Code

public function testAllowedProceeding() {
    $threshold = 2;
    $window_expired = -1;
    $this->flood
        ->register('test_event', $window_expired);
    $this->assertTrue($this->flood
        ->isAllowed('test_event', $threshold));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.