function MenuRouterTestCase::testMaintenanceModeLoginPaths in Drupal 7
Make sure the maintenance mode can be bypassed using hook_menu_site_status_alter().
See also
hook_menu_site_status_alter().
File
Class
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().'));
}