You are here

function LdapTestFunctions::prepConsumerConf in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::prepConsumerConf()
  2. 7.2 ldap_test/LdapTestFunctions.class.php \LdapTestFunctions::prepConsumerConf()
1 call to LdapTestFunctions::prepConsumerConf()
LdapTestFunctions::prepTestConfiguration in ldap_servers/tests/LdapTestFunctions.class.php

File

ldap_servers/tests/LdapTestFunctions.class.php, line 69
LdapTestCase.class.php

Class

LdapTestFunctions
@file LdapTestCase.class.php

Code

function prepConsumerConf($consumer_confs) {

  // create consumer authorization configuration.
  foreach ($consumer_confs as $consumer_type => $consumer_conf) {
    $consumer_obj = ldap_authorization_get_consumer_object($consumer_type);
    $consumer_conf_admin = new LdapAuthorizationConsumerConfAdmin($consumer_obj, TRUE);
    foreach ($consumer_conf as $property_name => $property_value) {
      $consumer_conf_admin->{$property_name} = $property_value;
    }
    $consumer_conf_admin
      ->save();
  }
}