function menu_test_theme_callback in SimpleTest 7
Theme callback to use when testing the theme callback functionality.
Parameters
$argument: The argument passed in from the URL.
Return value
The name of the custom theme to request for the current page.
1 string reference to 'menu_test_theme_callback'
- menu_test_menu in tests/
menu_test.module - Implement hook_menu().
File
- tests/
menu_test.module, line 105 - Dummy module implementing hook menu.
Code
function menu_test_theme_callback($argument) {
// Test using the variable administrative theme.
if ($argument == 'use-admin-theme') {
return variable_get('admin_theme');
}
elseif ($argument == 'use-stark-theme') {
return 'stark';
}
elseif ($argument == 'use-fake-theme') {
return 'fake_theme';
}
// For any other value of the URL argument, do not return anything. This
// allows us to test that returning nothing from a theme callback function
// causes the page to correctly fall back on using the main site theme.
}