public function LdapTestCase::checkConsumerConfSetup in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_test/LdapTestCase.class.php \LdapTestCase::checkConsumerConfSetup()
1 call to LdapTestCase::checkConsumerConfSetup()
- LdapAuthorizationOg2Tests::testFlags in ldap_authorization/
tests/ Og2Tests.test - Authorization configuration flags tests clumped together.
File
- ldap_test/
LdapTestCase.class.php, line 357
Class
Code
public function checkConsumerConfSetup($conf_id) {
$authorization_data = ldap_test_ldap_authorization_data();
$props_set_correctly = TRUE;
foreach ($authorization_data[$conf_id] as $consumer_type => $conf) {
$props_set_display = [];
foreach ($conf as $prop => $values) {
if (!property_exists($this->consumerAdminConf[$consumer_type], $prop)) {
$props_set_correctly = FALSE;
$props_set_display[] = $prop . " {$consumer_type} property does not exist in consumer conf object";
}
elseif (is_scalar($this->consumerAdminConf[$consumer_type]->{$prop})) {
if ($this->consumerAdminConf[$consumer_type]->{$prop} == $values) {
$props_set_display[] = $prop . " {$consumer_type} set to {$values} correctly";
}
else {
$props_set_correctly = FALSE;
$props_set_display[] = $prop . " {$consumer_type} not set to {$values} correctly";
}
}
}
}
return [
$props_set_display,
$props_set_correctly,
];
}