Test switching the default theme.
function testSwitchDefaultTheme() {
// Enable Bartik and set it as the default theme.
theme_enable(array(
'bartik',
));
$this
->drupalGet('admin/appearance');
$this
->clickLink(t('Set default'));
$this
->assertEqual(variable_get('theme_default', ''), 'bartik');
// Test the default theme on the secondary links (blocks admin page).
$this
->drupalGet('admin/structure/block');
$this
->assertText('Bartik(' . t('active tab') . ')', 'Default local task on blocks admin page is the default theme.');
// Switch back to Stark 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('Stark(' . t('active tab') . ')', 'Default local task on blocks admin page has changed.');
}