diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-29 06:38:52 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-11-29 06:38:52 +0000 |
commit | 8172877a62e7df25b0febc4b46dfa148af73f7db (patch) | |
tree | 26480ed6a0cf7a03a9ad065b2c91ae0901a7c758 /modules/block | |
parent | c9d78b60d4a584a95031cb29bef16de9867c916d (diff) | |
download | brdo-8172877a62e7df25b0febc4b46dfa148af73f7db.tar.gz brdo-8172877a62e7df25b0febc4b46dfa148af73f7db.tar.bz2 |
#947844 by sun: Clean up filter-related tests that load text formats by their human-readable name.
Diffstat (limited to 'modules/block')
-rw-r--r-- | modules/block/block.test | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/block/block.test b/modules/block/block.test index 30e91f617..67e503aa3 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -23,7 +23,7 @@ class BlockTestCase extends DrupalWebTestCase { // Create and log in an administrative user having access to the Full HTML // text format. - $full_html_format = db_query_range('SELECT * FROM {filter_format} WHERE name = :name', 0, 1, array(':name' => 'Full HTML'))->fetchObject(); + $full_html_format = filter_format_load('full_html'); $this->admin_user = $this->drupalCreateUser(array( 'administer blocks', filter_permission_name($full_html_format), @@ -119,8 +119,8 @@ class BlockTestCase extends DrupalWebTestCase { $custom_block['info'] = $this->randomName(8); $custom_block['title'] = $this->randomName(8); $custom_block['body[value]'] = '<h1>Full HTML</h1>'; - $full_html_format_id = db_query_range('SELECT format FROM {filter_format} WHERE name = :name', 0, 1, array(':name' => 'Full HTML'))->fetchField(); - $custom_block['body[format]'] = $full_html_format_id; + $full_html_format = filter_format_load('full_html'); + $custom_block['body[format]'] = $full_html_format->format; $this->drupalPost('admin/structure/block/add', $custom_block, t('Save block')); // Set the created custom block to a specific region. |