2009-01-22 16:38:15 +00:00
|
|
|
<?php
|
2009-04-26 15:14:55 +00:00
|
|
|
// $Id$
|
2009-01-22 16:38:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Mock module for locale layer tests.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2009-05-27 18:34:03 +00:00
|
|
|
* Implement hook_locale().
|
2009-01-22 16:38:15 +00:00
|
|
|
*/
|
|
|
|
function locale_test_locale($op = 'groups') {
|
|
|
|
switch ($op) {
|
|
|
|
case 'groups':
|
|
|
|
return array('custom' => t('Custom'));
|
|
|
|
}
|
|
|
|
}
|
2009-08-18 11:22:36 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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');
|
|
|
|
}
|
|
|
|
}
|