diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-05-13 15:32:45 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-05-13 15:32:45 -0400 |
commit | 148569d98637b952c6aacb8bc28a9fd8c3211d84 (patch) | |
tree | a7790467f2ca5d46042a7056515a6f34e420e874 /modules/system/system.test | |
parent | 8f46835ea281a1a70c91350fd743a9a0d583333d (diff) | |
download | brdo-148569d98637b952c6aacb8bc28a9fd8c3211d84.tar.gz brdo-148569d98637b952c6aacb8bc28a9fd8c3211d84.tar.bz2 |
- Patch #690544 by bleen18, andypost, marcvangend, dbeheydt, rschwab, robertom: blocks admin (admin/structure/block) requires menu_rebuild() to display settings for current theme.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r-- | modules/system/system.test | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/modules/system/system.test b/modules/system/system.test index 19131dff4..be4e36698 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1359,7 +1359,7 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { function setUp() { parent::setUp(); - $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'view the administration theme', 'administer themes', 'bypass node access')); + $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'view the administration theme', 'administer themes', 'bypass node access', 'administer blocks')); $this->drupalLogin($this->admin_user); $this->node = $this->drupalCreateNode(); } @@ -1443,6 +1443,26 @@ class SystemThemeFunctionalTest extends DrupalWebTestCase { $this->drupalGet('node/add'); $this->assertRaw('themes/bartik', t('Site default theme used on the add content page.')); } + + /** + * Test switching the default theme. + */ + 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.')); + } } |