function CascadingStylesheetsTestCase::testAlter
Tests Locale module's CSS Alter to include RTL overrides.
File
-
modules/
simpletest/ tests/ common.test, line 979
Class
- CascadingStylesheetsTestCase
- Test the Drupal CSS system.
Code
function testAlter() {
// Switch the language to a right to left language and add system.base.css.
global $language;
$language->direction = LANGUAGE_RTL;
$path = drupal_get_path('module', 'system');
drupal_add_css($path . '/system.base.css');
// Check to see if system.base-rtl.css was also added.
$styles = drupal_get_css();
$this->assert(strpos($styles, $path . '/system.base-rtl.css') !== FALSE, 'CSS is alterable as right to left overrides are added.');
// Change the language back to left to right.
$language->direction = LANGUAGE_LTR;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.