public function LdapTestCase::prepTestData in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_test/LdapTestCase.class.php \LdapTestCase::prepTestData()
Setup configuration and fake test data for all ldap modules.
Parameters
string $test_ldap_id: name of directory in ldap_test where data is (e.g. hogwarts)
the following params are ids that indicate what config data in /ldap_test/<module_name>.conf.inc to use for example if $ldap_user_conf_id = 'ad_authentication', the array /ldap_test/ldap_user.conf.inc with the key 'ad_authentication' will be used for the user module cofiguration.
array $sids: to setup.
string $ldap_user_conf_id:
string $ldap_authentication_conf_id: = NULL,.
string $ldap_authorization_conf_id: = NULL,.
string $ldap_feeds_conf_id: = NULL,.
string $ldap_query_conf_id: = NULL.
16 calls to LdapTestCase::prepTestData()
- LdapAuthenticationTestCase::testAuthenticationWhitelistTests in ldap_authentication/
tests/ ldap_authentication.test - LdapAuthenticationTestCase::testExclusiveModeUserLogon in ldap_authentication/
tests/ ldap_authentication.test - LDAP Authentication Exclusive Mode User Logon Test (ids = LDAP_authen.EM.ULT.*)
- LdapAuthenticationTestCase::testMixedModeUserLogon in ldap_authentication/
tests/ ldap_authentication.test - LDAP Authentication Mixed Mode User Logon Test (ids = LDAP_authen.MM.ULT.*)
- LdapAuthenticationTestCase::testSSOUserLogon in ldap_authentication/
tests/ ldap_authentication.test - LDAP Authentication Exclusive Mode User Logon Test (ids = LDAP_authen.EM.ULT.*)
- LdapAuthenticationTestCase::testUI in ldap_authentication/
tests/ ldap_authentication.test - Make sure user admin interface works.
File
- ldap_test/
LdapTestCase.class.php, line 89
Class
Code
public function prepTestData($test_ldap_id, $sids, $ldap_user_conf_id = NULL, $ldap_authentication_conf_id = NULL, $ldap_authorization_conf_id = NULL, $ldap_feeds_conf_id = NULL, $ldap_query_conf_id = NULL) {
$this->testFunctions
->configureLdapServers($sids);
foreach ($sids as $sid) {
$this->testFunctions
->populateFakeLdapServerData($test_ldap_id, $sid);
}
if ($ldap_user_conf_id) {
$this->testFunctions
->configureLdapUser($ldap_user_conf_id);
}
if ($ldap_authentication_conf_id) {
$this->testFunctions
->configureLdapAuthentication($ldap_authentication_conf_id, $sids);
}
if ($ldap_authorization_conf_id) {
$authorization_data = ldap_test_ldap_authorization_data();
if (!empty($authorization_data[$ldap_authorization_conf_id])) {
$this->testFunctions
->prepConsumerConf($authorization_data[$ldap_authorization_conf_id]);
foreach ($authorization_data[$ldap_authorization_conf_id] as $consumer_type => $discard) {
$this->consumerAdminConf[$consumer_type] = ldap_authorization_get_consumer_admin_object($consumer_type);
}
}
}
}