protected function DefaultRoleEventTest::expectOgRoleCreation in Organic groups 8
Adds an expectation that roles with the given properties should be created.
Parameters
\Drupal\og\Entity\OgRole[] $roles: An array of role properties that are expected to be passed to the roles that should be created.
17 calls to DefaultRoleEventTest::expectOgRoleCreation()
- DefaultRoleEventTest::testAddInvalidRole in tests/
src/ Unit/ DefaultRoleEventTest.php - Tests adding an invalid OG role to the default role event.
- DefaultRoleEventTest::testAddInvalidRoles in tests/
src/ Unit/ DefaultRoleEventTest.php - Tests adding invalid OG roles to the default role event.
- DefaultRoleEventTest::testAddRole in tests/
src/ Unit/ DefaultRoleEventTest.php - Tests adding an OG role to the default role event.
- DefaultRoleEventTest::testAddRoles in tests/
src/ Unit/ DefaultRoleEventTest.php - Tests adding OG roles to the default role event.
- DefaultRoleEventTest::testDeleteRole in tests/
src/ Unit/ DefaultRoleEventTest.php - Tests deleting OG roles from the default role event.
File
- tests/
src/ Unit/ DefaultRoleEventTest.php, line 541
Class
- DefaultRoleEventTest
- Tests default role events.
Namespace
Drupal\Tests\og\UnitCode
protected function expectOgRoleCreation(array &$roles) {
foreach ($roles as &$properties) {
$role = new OgRole($properties);
$properties = $role;
}
}