From b7ac66710151bfbb197e653c1d03a43d2ccfcbfa Mon Sep 17 00:00:00 2001 From: webchick Date: Mon, 30 Apr 2012 21:31:44 -0700 Subject: Issue #1213536 by David_Rothstein, tim.plunkett, sun, effulgentsia, Yorirou, xjm: Fixed Non-resettable theme_get_registry() cache causes problems for non-interactive installations. --- modules/simpletest/tests/theme.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/simpletest/tests/theme.test') diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index 85f67b460..ba6440028 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -111,6 +111,19 @@ class ThemeTestCase extends DrupalWebTestCase { $this->drupalGet('theme-test/suggestion'); variable_set('preprocess_css', 0); } + + /** + * Ensures the theme registry is rebuilt when modules are disabled/enabled. + */ + function testRegistryRebuild() { + $this->assertIdentical(theme('theme_test_foo', array('foo' => 'a')), 'a', 'The theme registry contains theme_test_foo.'); + + module_disable(array('theme_test'), FALSE); + $this->assertIdentical(theme('theme_test_foo', array('foo' => 'b')), '', 'The theme registry does not contain theme_test_foo, because the module is disabled.'); + + module_enable(array('theme_test'), FALSE); + $this->assertIdentical(theme('theme_test_foo', array('foo' => 'c')), 'c', 'The theme registry contains theme_test_foo again after re-enabling the module.'); + } } /** -- cgit v1.2.3