diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-03 05:11:16 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-03 05:11:16 +0000 |
commit | 6b2b3eb9318dcaa575a503f90326c8e24a0f7671 (patch) | |
tree | 6c7c622cc731d46b67145e37a192f430c1f948a5 /modules | |
parent | 3e05ba7bcce0a32bcaced9eda3aa31d386d6c992 (diff) | |
download | brdo-6b2b3eb9318dcaa575a503f90326c8e24a0f7671.tar.gz brdo-6b2b3eb9318dcaa575a503f90326c8e24a0f7671.tar.bz2 |
#901062 by effulgentsia, ygerasimov, et al: Fixed regression: themes can no longer remove stylesheets by overriding them in .info files.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/simpletest/tests/common_test.css | 3 | ||||
-rw-r--r-- | modules/simpletest/tests/common_test.print.css | 3 | ||||
-rw-r--r-- | modules/simpletest/tests/theme.test | 23 |
3 files changed, 29 insertions, 0 deletions
diff --git a/modules/simpletest/tests/common_test.css b/modules/simpletest/tests/common_test.css new file mode 100644 index 000000000..023eae62d --- /dev/null +++ b/modules/simpletest/tests/common_test.css @@ -0,0 +1,3 @@ +/* $Id$ */ + +/* This file is for testing CSS file inclusion, no contents are necessary. */ diff --git a/modules/simpletest/tests/common_test.print.css b/modules/simpletest/tests/common_test.print.css new file mode 100644 index 000000000..023eae62d --- /dev/null +++ b/modules/simpletest/tests/common_test.print.css @@ -0,0 +1,3 @@ +/* $Id$ */ + +/* This file is for testing CSS file inclusion, no contents are necessary. */ diff --git a/modules/simpletest/tests/theme.test b/modules/simpletest/tests/theme.test index f6dea3309..00eb49b89 100644 --- a/modules/simpletest/tests/theme.test +++ b/modules/simpletest/tests/theme.test @@ -74,6 +74,29 @@ class ThemeUnitTest extends DrupalWebTestCase { $this->drupalGet('theme-test/alter'); $this->assertText('The altered data is test_theme_theme_test_alter_alter was invoked.', t('The theme was able to implement an alter hook during page building before anything was rendered.')); } + + /** + * Ensures a theme's .info file is able to override a module CSS file from being added to the page. + * + * @see test_theme.info + */ + function testCSSOverride() { + // Reuse the same page as in testPreprocessForSuggestions(). We're testing + // what is output to the HTML HEAD based on what is in a theme's .info file, + // so it doesn't matter what page we get, as long as it is themed with the + // test theme. First we test with CSS aggregation disabled. + variable_set('preprocess_css', 0); + $this->drupalGet('theme-test/suggestion'); + $this->assertNoText('system.base.css', t('The theme\'s .info file is able to override a module CSS file from being added to the page.')); + + // Also test with aggregation enabled, simply ensuring no PHP errors are + // triggered during drupal_build_css_cache() when a source file doesn't + // exist. Then allow remaining tests to continue with aggregation disabled + // by default. + variable_set('preprocess_css', 1); + $this->drupalGet('theme-test/suggestion'); + variable_set('preprocess_css', 0); + } } /** |