diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-12-03 15:33:42 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-12-03 15:33:42 +0000 |
commit | d1a2de607e23da467c1366aca04ac5f61328a37a (patch) | |
tree | cbaca2bea89c96d310b1dabbf99d5b134c809f23 /modules/simpletest/tests/common.test | |
parent | f43ee59e056e3d769545f90a3ab26244fb229b00 (diff) | |
download | brdo-d1a2de607e23da467c1366aca04ac5f61328a37a.tar.gz brdo-d1a2de607e23da467c1366aca04ac5f61328a37a.tar.bz2 |
- Patch #626024 by sun, catch: fixed filter_list_format() hits database too often / filter_format_save() doesn't save all filters.
Diffstat (limited to 'modules/simpletest/tests/common.test')
-rw-r--r-- | modules/simpletest/tests/common.test | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 274dceb45..8b2e24e21 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -590,16 +590,14 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase { $expected = 'font-size:254px;'; // 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(); $settings = array( 'type' => 'page', 'body' => array( 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(), + 'format' => $php_format_id, ), ), ), |