diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-11-13 14:06:43 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-11-13 14:06:43 +0000 |
commit | 346854c12e5ce1560df35de492a4c283623dccfb (patch) | |
tree | 2766a148aefaf1cd4a2e92d2156c547f49d7fa68 /modules/simpletest/tests | |
parent | b51569528f42fbecbcefc4ffb2d9b982d43e0186 (diff) | |
download | brdo-346854c12e5ce1560df35de492a4c283623dccfb.tar.gz brdo-346854c12e5ce1560df35de492a4c283623dccfb.tar.bz2 |
- Patch #927406 by Damien Tournoud, carlos8f, george@dynapres.nl, amateescu, Volx: colorable themes fail when CSS aggregation is enabled due to improper stream wrapper usage.
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r-- | modules/simpletest/tests/common.test | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index c63633ee7..82f8b2e39 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -881,17 +881,20 @@ class CascadingStylesheetsUnitTest extends DrupalUnitTestCase { foreach ($testfiles as $file) { $expected = file_get_contents("$path/$file.unoptimized.css"); $unoptimized_output = drupal_load_stylesheet("$path/$file.unoptimized.css", FALSE); - $this->verbose('Expected:<pre>' . $expected . '</pre>' - . 'Actual:<pre>' . $unoptimized_output . '</pre>' - ); $this->assertEqual($unoptimized_output, $expected, t('Unoptimized CSS file has expected contents (@file)', array('@file' => $file))); $expected = file_get_contents("$path/$file.optimized.css"); $optimized_output = drupal_load_stylesheet("$path/$file", TRUE); - $this->verbose('Expected:<pre>' . $expected . '</pre>' - . 'Actual:<pre>' . $optimized_output . '</pre>' - ); $this->assertEqual($optimized_output, $expected, t('Optimized CSS file has expected contents (@file)', array('@file' => $file))); + + // Repeat the tests by accessing the stylesheets by URL. + $expected = file_get_contents("$path/$file.unoptimized.css"); + $unoptimized_output_url = drupal_load_stylesheet($GLOBALS['base_url'] . "/$path/$file.unoptimized.css", FALSE); + $this->assertEqual($unoptimized_output, $expected, t('Unoptimized CSS file (loaded from an URL) has expected contents (@file)', array('@file' => $file))); + + $expected = file_get_contents("$path/$file.optimized.css"); + $optimized_output = drupal_load_stylesheet($GLOBALS['base_url'] . "/$path/$file", TRUE); + $this->assertEqual($optimized_output, $expected, t('Optimized CSS file (loaded from an URL) has expected contents (@file)', array('@file' => $file))); } } } |