drupal/modules/locale/tests/locale_test.module

28 lines
482 B
Plaintext

<?php
// $Id$
/**
* @file
* Mock module for locale layer tests.
*/
/**
* Implement hook_locale().
*/
function locale_test_locale($op = 'groups') {
switch ($op) {
case 'groups':
return array('custom' => t('Custom'));
}
}
/**
* For testing domain language negotiation, we fake it by setting
* the HTTP_HOST here
*/
function locale_test_boot() {
if (variable_get('locale_test_domain')) {
$_SERVER['HTTP_HOST'] = variable_get('locale_test_domain');
}
}