class MigrateUserFloodTest

Same name and namespace in other branches
  1. 11.x core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php \Drupal\Tests\user\Kernel\Migrate\d7\MigrateUserFloodTest

Migrates user flood control configuration.

@group user

Hierarchy

Expanded class hierarchy of MigrateUserFloodTest

File

core/modules/user/tests/src/Kernel/Migrate/d7/MigrateUserFloodTest.php, line 12

Namespace

Drupal\Tests\user\Kernel\Migrate\d7
View source
class MigrateUserFloodTest extends MigrateDrupal7TestBase {
  
  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    parent::setUp();
    $this->installConfig([
      'user',
    ]);
    $this->executeMigration('d7_user_flood');
  }
  
  /**
   * Tests the migration.
   */
  public function testMigration() {
    $expected = [
      '_core' => [
        'default_config_hash' => 'UYfMzeP1S8jKm9PSvxf7nQNe8DsNS-3bc2WSNNXBQWs',
      ],
      'uid_only' => TRUE,
      'ip_limit' => 30,
      'ip_window' => 7200,
      'user_limit' => 22,
      'user_window' => 86400,
    ];
    $this->assertSame($expected, $this->config('user.flood')
      ->get());
  }

}

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