Commit 6e57cf73 authored by Dries's avatar Dries

- Patch #11218 by sun: fixed fatal error.

parent 339085eb
...@@ -187,12 +187,12 @@ class TextFieldTestCase extends DrupalWebTestCase { ...@@ -187,12 +187,12 @@ class TextFieldTestCase extends DrupalWebTestCase {
$this->drupalLogin($this->admin_user); $this->drupalLogin($this->admin_user);
$edit = array('name' => $this->randomName()); $edit = array('name' => $this->randomName());
$this->drupalPost('admin/config/content/formats/add', $edit, t('Save configuration')); $this->drupalPost('admin/config/content/formats/add', $edit, t('Save configuration'));
filter_format_reset_cache(); filter_formats_reset();
$this->checkPermissions(array(), TRUE); $this->checkPermissions(array(), TRUE);
$format_id = db_query("SELECT format FROM {filter_format} WHERE name = :name", array(':name' => $edit['name']))->fetchField(); $format_id = db_query("SELECT format FROM {filter_format} WHERE name = :name", array(':name' => $edit['name']))->fetchField();
$permission = filter_permission_name(filter_format_load($format_id)); $permission = filter_permission_name(filter_format_load($format_id));
$rid = max(array_keys($this->web_user->roles)); $rid = max(array_keys($this->web_user->roles));
user_role_set_permissions($rid, array($permission), TRUE); user_role_grant_permissions($rid, array($permission), TRUE);
$this->drupalLogin($this->web_user); $this->drupalLogin($this->web_user);
// Display edition form. // Display edition form.
...@@ -214,11 +214,6 @@ class TextFieldTestCase extends DrupalWebTestCase { ...@@ -214,11 +214,6 @@ class TextFieldTestCase extends DrupalWebTestCase {
$this->content = drupal_render($entity->content); $this->content = drupal_render($entity->content);
$this->assertRaw($value, t('Value is displayed unfiltered')); $this->assertRaw($value, t('Value is displayed unfiltered'));
} }
// Test formatters.
/**
*
*/
} }
class TextSummaryTestCase extends DrupalWebTestCase { class TextSummaryTestCase extends DrupalWebTestCase {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment