You are here

function LdapTestCase::createTestUserFields in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_test/LdapTestCase.class.php \LdapTestCase::createTestUserFields()

keep user entity fields function for ldap_user in base class instead of user test class in case module integration testing is needed

2 calls to LdapTestCase::createTestUserFields()
LdapTestCase::setUp in ldap_test/LdapTestCase.class.php
LdapUserIntegrationTests::testProvisionToLdap in ldap_user/tests/ldap_user.test
integration tests for provisioning to ldap

File

ldap_test/LdapTestCase.class.php, line 188

Class

LdapTestCase

Code

function createTestUserFields() {
  foreach ($this
    ->ldap_user_test_entity_fields() as $field_id => $field_conf) {
    $field_info = field_info_field($field_id);
    if (!$field_info) {
      field_create_field($field_conf['field']);
      field_create_instance($field_conf['instance']);
    }
    $field_info = field_info_field($field_id);
  }
}