public function DefaultRoleEventTest::testSetInvalidRoles in Organic groups 8
Tests setting invalid OG roles for the default role event.
@covers ::setRoles
@dataProvider invalidDefaultRoleProvider
Parameters
array $invalid_roles: An array of invalid test default roles.
File
- tests/
src/ Unit/ DefaultRoleEventTest.php, line 389
Class
- DefaultRoleEventTest
- Tests default role events.
Namespace
Drupal\Tests\og\UnitCode
public function testSetInvalidRoles(array $invalid_roles) {
$this
->expectOgRoleCreation($invalid_roles);
$this
->expectException(\InvalidArgumentException::class);
$this->defaultRoleEvent
->setRoles($invalid_roles);
}