| 7 menu.test | MenuRouterTestCase::testMaintenanceModeLoginPaths() |
| 8 menu.test | MenuRouterTestCase::testMaintenanceModeLoginPaths() |
Make sure the maintenance mode can be bypassed using hook_menu_site_status_alter().
See also
hook_menu_site_status_alter().
File
- modules/
simpletest/ tests/ menu.test, line 226 - Provides SimpleTests for menu.inc.
Code
function testMaintenanceModeLoginPaths() {
variable_set('maintenance_mode', TRUE);
$offline_message = t('@site is currently under maintenance. We should be back shortly. Thank you for your patience.', array('@site' => variable_get('site_name', 'Drupal')));
$this->drupalLogout();
$this->drupalGet('node');
$this->assertText($offline_message);
$this->drupalGet('menu_login_callback');
$this->assertText('This is menu_login_callback().', t('Maintenance mode can be bypassed through hook_login_paths().'));
}
Login or register to post comments