You are here

public function LdapAuthorizationOg2Tests::createCustomRoles in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_authorization/tests/Og2Tests.test \LdapAuthorizationOg2Tests::createCustomRoles()
1 call to LdapAuthorizationOg2Tests::createCustomRoles()
LdapAuthorizationOg2Tests::testBasicFunctionsAndApi in ldap_authorization/tests/Og2Tests.test
just make sure install succeeds and

File

ldap_authorization/tests/Og2Tests.test, line 85

Class

LdapAuthorizationOg2Tests

Code

public function createCustomRoles() {
  foreach ($this->customOgRoles as $og_role_name => $og_role) {
    $role = new stdClass();
    $role->gid = 0;
    $role->group_type = $og_role['entity_type'];
    $role->group_bundle = $og_role['bundle_type'];
    $role->name = $og_role_name;
    $status = og_role_save($role);
  }
}