function MigrateUserRoleTest::assertRoles

Same name in other branches
  1. 9 core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php \Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserRoleTest::assertRoles()
  2. 8.9.x core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php \Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserRoleTest::assertRoles()
  3. 11.x core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php \Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserRoleTest::assertRoles()

Helper to assert the user roles.

@internal

Parameters

array $permissions: Contains the valid and invalid permissions.

\Drupal\migrate\Plugin\MigrateIdMapInterface $id_map: The map table plugin.

1 call to MigrateUserRoleTest::assertRoles()
MigrateUserRoleTest::testUserRole in core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php
Tests user role migration.

File

core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php, line 96

Class

MigrateUserRoleTest
Upgrade user roles to user.role.*.yml.

Namespace

Drupal\Tests\user\Kernel\Migrate\d6

Code

protected function assertRoles(array $permissions, MigrateIdMapInterface $id_map) : void {
    foreach ($permissions as $rid => $datum) {
        $this->assertRole($rid, $datum['valid'], $datum['rid'], $id_map);
    }
}

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