From d5968378ace8c13bf1d4b9d8365d725de76e0d75 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 22 Jan 2009 03:56:12 +0000 Subject: #345973 by aaron and Rob Loach: Move parameter on drupal_add_css/js to a 'type' instead, to clean up calling code. --- modules/simpletest/tests/common.test | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'modules/simpletest/tests') diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 8f0ede290..78dc9f769 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -170,7 +170,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase { function setUp() { parent::setUp(); // Reset drupal_add_css() before each test. - drupal_add_css(NULL, NULL, TRUE); + drupal_add_css(NULL, 'reset'); } /** @@ -189,6 +189,14 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase { $this->assertEqual($css['all']['module'][$path], TRUE, t('Adding a CSS file caches it properly.')); } + /** + * Makes sure that reseting the CSS empties the cache. + */ + function testReset() { + drupal_add_css(NULL, 'reset'); + $this->assertEqual(array(), drupal_add_css(), t('Resetting the CSS empties the cache.')); + } + /** * Tests rendering the stylesheets. */ @@ -352,7 +360,7 @@ class JavaScriptTestCase extends DrupalWebTestCase { variable_set('preprocess_js', 0); // Reset drupal_add_js() before each test. - drupal_add_js(NULL, NULL, TRUE); + drupal_add_js(NULL, 'reset'); } function tearDown() { @@ -404,7 +412,7 @@ class JavaScriptTestCase extends DrupalWebTestCase { */ function testReset() { drupal_add_js('misc/collapse.js'); - drupal_add_js(NULL, NULL, TRUE); + drupal_add_js(NULL, 'reset'); $this->assertEqual(array(), drupal_add_js(), t('Resetting the JavaScript correctly empties the cache.')); } -- cgit v1.2.3