public function DefaultRoleEventTest::testGetRole in Organic groups 8
Tests getting OG roles from the default role event.
@covers ::getRole
@dataProvider defaultRoleProvider
Parameters
array $roles: An array of test default roles.
File
- tests/
src/ Unit/ DefaultRoleEventTest.php, line 58
Class
- DefaultRoleEventTest
- Tests default role events.
Namespace
Drupal\Tests\og\UnitCode
public function testGetRole(array $roles) {
$this
->expectOgRoleCreation($roles);
$this->defaultRoleEvent
->setRoles($roles);
foreach ($roles as $name => $role) {
$this
->assertRoleEquals($role, $this->defaultRoleEvent
->getRole($name));
}
}