public function LdapTestCase::testId in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_test/LdapTestCase.class.php \LdapTestCase::testId()
Attempt to derive a testid from backtrace.
6 calls to LdapTestCase::testId()
- LdapAuthenticationTestCase::testUI in ldap_authentication/
tests/ ldap_authentication.test - Make sure user admin interface works.
- LdapUserIntegrationTests::testDrupalAccountsOrphaned in ldap_user/
tests/ ldap_user.test - Test cron function for dealing with ldap associated users who no longer have ldap entries
- LdapUserIntegrationTests::testProvisionToLdap in ldap_user/
tests/ ldap_user.test - Integration tests for provisioning to ldap.
- LdapUserUITests::testUI in ldap_user/
tests/ ldap_user.test - Make sure user admin interface works. (its a beast)
- LdapUserUnitTests::testProvisionToDrupal in ldap_user/
tests/ ldap_user.test
File
- ldap_test/
LdapTestCase.class.php, line 126
Class
Code
public function testId($description = NULL, $method = NULL) {
static $test_id;
static $i;
if ($description || $method) {
$test_id = NULL;
$i = 0;
}
elseif ($test_id) {
$i++;
return $test_id . '.' . $i;
}
if (!$method) {
$trace = debug_backtrace();
$caller = array_shift($trace);
$caller = array_shift($trace);
$method = $caller['function'];
$count = 1;
$method = str_replace('test', '', $method, $count);
}
$test_id = join(".", [
$this->module_name,
$method,
$description,
]);
return $test_id;
}