| 7 system.test | SystemThemeFunctionalTest::testSwitchDefaultTheme() |
| 8 system.test | SystemThemeFunctionalTest::testSwitchDefaultTheme() |
Test switching the default theme.
File
- modules/
system/ system.test, line 1790 - Tests for system.module.
Code
function testSwitchDefaultTheme() {
// Enable "stark" and set it as the default theme.
theme_enable(array('stark'));
$this->drupalGet('admin/appearance');
$this->clickLink(t('Set default'), 1);
$this->assertTrue(variable_get('theme_default', '') == 'stark', t('Site default theme switched successfully.'));
// Test the default theme on the secondary links (blocks admin page).
$this->drupalGet('admin/structure/block');
$this->assertText('Stark(' . t('active tab') . ')', t('Default local task on blocks admin page is the default theme.'));
// Switch back to Bartik and test again to test that the menu cache is cleared.
$this->drupalGet('admin/appearance');
$this->clickLink(t('Set default'), 0);
$this->drupalGet('admin/structure/block');
$this->assertText('Bartik(' . t('active tab') . ')', t('Default local task on blocks admin page has changed.'));
}
Login or register to post comments