t('[189568] Overriding module CSS with theme CSS'), 'desc' => t('Themes may replace module-defined CSS files by adding a stylesheet with the same filename. For example, themes/garland/system-menus.css would replace modules/system/system-menus.css. This allows themes to override complete CSS files, rather than specific selectors, when necessary.'), 'group' => t('Drupal 7 Tests'), ); } // There are 2 similar CSS. One belongs to a module, second belongs to a theme. // The module's CSS should not be showed. function testIssue() { $in_module_css = 'my_test_module/my_test_module.css'; $in_theme_css = 'themes/general_theme/my_test_module.css'; drupal_add_css($in_theme_css, 'theme'); // order here is important! drupal_add_css($in_module_css, 'module'); $result = drupal_get_css(); $this->assertNoUnwantedPattern("|$in_module_css|", $result, t('Module\'s CSS should not be here')); } }