function LdapServerTest::__construct in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_test/LdapServerTest.class.php \LdapServerTest::__construct()
- 7 ldap_servers/tests/LdapServerTest.class.php \LdapServerTest::__construct()
Constructor Method
can take array of form property_name => property_value or $sid, where sid is used to derive the include file.
Overrides LdapServer::__construct
File
- ldap_test/
LdapServerTest.class.php, line 34 - Simpletest ldapServer class for testing without an actual ldap server
Class
Code
function __construct($sid) {
if (!is_scalar($sid)) {
$test_data = $sid;
$sid = $test_data['sid'];
}
else {
$test_data = variable_get('ldap_test_server__' . $sid, array());
}
$bindpw = isset($test_data['bindpw']) ? $test_data['bindpw'] : 'goodpwd';
$this->sid = $sid;
$this
->refreshFakeData();
$this
->initDerivedProperties($bindpw);
}