diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-07-30 02:47:28 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-07-30 02:47:28 +0000 |
commit | 37c3c7ec7aff7fad84b3839ac3fa5437b7b256b2 (patch) | |
tree | 97fe1cd55f6501efaaa21129abd043fc94242d8e /modules/simpletest/tests | |
parent | 4f2d69698c849e4e20ad5ae92b0652654a88f840 (diff) | |
download | brdo-37c3c7ec7aff7fad84b3839ac3fa5437b7b256b2.tar.gz brdo-37c3c7ec7aff7fad84b3839ac3fa5437b7b256b2.tar.bz2 |
- Patch #769226 by Owen Barton, alanburke, sun: fixed JS/CSS preprocess should default to FALSE.
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r-- | modules/simpletest/tests/ajax.test | 4 | ||||
-rw-r--r-- | modules/simpletest/tests/common.test | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/simpletest/tests/ajax.test b/modules/simpletest/tests/ajax.test index 97cd2f5d2..91572bda0 100644 --- a/modules/simpletest/tests/ajax.test +++ b/modules/simpletest/tests/ajax.test @@ -53,7 +53,7 @@ class AJAXFrameworkTestCase extends AJAXTestCase { * Test behavior of ajax_render_error(). */ function testAJAXRenderError() { - $result = $this->drupalGetAJAX('ajax-test/render-error'); + $result = $this->discardSettings($this->drupalGetAJAX('ajax-test/render-error')); // Verify default error message. $this->assertEqual($result[0]['command'], 'alert', t('ajax_render_error() invokes alert command.')); $this->assertEqual($result[0]['text'], t('An error occurred while handling the request: The server received invalid input.'), t('Default error message is output.')); @@ -61,7 +61,7 @@ class AJAXFrameworkTestCase extends AJAXTestCase { $edit = array( 'message' => 'Custom error message.', ); - $result = $this->drupalGetAJAX('ajax-test/render-error', array('query' => $edit)); + $result = $this->discardSettings($this->drupalGetAJAX('ajax-test/render-error', array('query' => $edit))); $this->assertEqual($result[0]['text'], $edit['message'], t('Custom error message is output.')); } } diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 01635a5ea..35c5bbc3b 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -621,7 +621,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase { function testRenderInlinePreprocess() { $css = 'body { padding: 0px; }'; $css_preprocessed = '<style type="text/css" media="all">' . drupal_load_stylesheet_content($css, TRUE) . '</style>'; - drupal_add_css($css, 'inline'); + drupal_add_css($css, array('type' => 'inline', 'preprocess' => TRUE)); $styles = drupal_get_css(); $this->assertEqual(trim($styles), $css_preprocessed, t('Rendering preprocessed inline CSS adds it to the page.')); } @@ -631,7 +631,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase { */ function testRenderInlineNoPreprocess() { $css = 'body { padding: 0px; }'; - drupal_add_css($css, array('type' => 'inline', 'preprocess' => FALSE)); + drupal_add_css($css, array('type' => 'inline')); $styles = drupal_get_css(); $this->assertTrue(strpos($styles, $css) > 0, t('Rendering non-preprocessed inline CSS adds it to the page.')); } @@ -641,7 +641,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase { */ function testRenderInlineFullPage() { $css = 'body { font-size: 254px; }'; - $expected = 'font-size:254px;'; + $expected = $css; // Create a node, using the PHP filter that tests drupal_add_css(). $php_format_id = db_query_range('SELECT format FROM {filter_format} WHERE name = :name', 0, 1, array(':name' => 'PHP code'))->fetchField(); |