summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/ajax.test4
-rw-r--r--modules/simpletest/tests/common.test6
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();