You are here

public function GroupRoleStorageTest::testLoadSynchronizedByGroupTypes in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/GroupRoleStorageTest.php \Drupal\Tests\group\Kernel\GroupRoleStorageTest::testLoadSynchronizedByGroupTypes()

Tests the loading of synchronized group roles by group types.

@covers ::loadSynchronizedByGroupTypes

File

tests/src/Kernel/GroupRoleStorageTest.php, line 98

Class

GroupRoleStorageTest
Tests the behavior of group role storage handler.

Namespace

Drupal\Tests\group\Kernel

Code

public function testLoadSynchronizedByGroupTypes() {
  $actual = array_keys($this->storage
    ->loadSynchronizedByGroupTypes([
    'default',
  ]));
  $expected = [
    $this->groupRoleSynchronizer
      ->getGroupRoleId('default', 'test'),
  ];
  $this
    ->assertEqualsCanonicalizing($expected, $actual, 'Can load synchronized group roles by group types.');
}