You are here

uc_addresses_test.module in Ubercart Addresses 6.2

Same filename and directory in other branches
  1. 7 tests/uc_addresses_test.module

Testing module for Ubercart Addresses functionality.

File

tests/uc_addresses_test.module
View source
<?php

/**
 * @file
 * Testing module for Ubercart Addresses functionality.
 */

/**
 * Implements hook_uc_addresses_field_handlers().
 *
 * Registers field handlers.
 */
function uc_addresses_test_uc_addresses_field_handlers() {
  $path = drupal_get_path('module', 'uc_addresses_test') . '/handlers';
  $info = array();
  $info['UcAddressesTestTextFieldHandler'] = array(
    'hidden' => FALSE,
    'handler' => array(
      'parent' => 'UcAddressesTextFieldHandler',
      'class' => 'UcAddressesTestTextFieldHandler',
      'file' => 'uc_addresses.handlers.inc',
      'path' => $path,
    ),
  );
  return $info;
}

/**
 * Implements hook_uc_addresses_fields().
 */
function uc_addresses_test_uc_addresses_fields() {
  return array(
    'billing_extra1' => array(
      'title' => t('Billing Extra Field'),
      'handler' => 'UcAddressesTestTextFieldHandler',
      'display_settings' => array(
        'default' => TRUE,
      ),
      'compare' => TRUE,
      'address_type' => 'billing',
    ),
    'shipping_extra2' => array(
      'title' => t('Delivery Extra Field'),
      'handler' => 'UcAddressesTestTextFieldHandler',
      'display_settings' => array(
        'default' => TRUE,
      ),
      'compare' => TRUE,
      'address_type' => 'shipping',
    ),
  );
}