summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/common.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/common.test')
-rw-r--r--modules/simpletest/tests/common.test12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test
index da49b8f56..2ad58a10a 100644
--- a/modules/simpletest/tests/common.test
+++ b/modules/simpletest/tests/common.test
@@ -374,7 +374,17 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
// Create a node, using the PHP filter that tests drupal_add_css().
$settings = array(
'type' => 'page',
- 'body' => array(FIELD_LANGUAGE_NONE => array(array('value' => t('This tests the inline CSS!') . "<?php drupal_add_css('$css', 'inline'); ?>", 'format' => 3))), // PHP filter.
+ 'body' => array(
+ FIELD_LANGUAGE_NONE => array(
+ array(
+ 'value' => t('This tests the inline CSS!') . "<?php drupal_add_css('$css', 'inline'); ?>",
+ // The "PHP code" format is always the most recent one added, since
+ // the PHP module was enabled in the setUp() method of the current
+ // test.
+ 'format' => db_query("SELECT MAX(format) FROM {filter_format}")->fetchField(),
+ ),
+ ),
+ ),
'promote' => 1,
);
$node = $this->drupalCreateNode($settings);