You are here

function PrivatemsgTestCase::setUp in Privatemsg 7.2

Same name and namespace in other branches
  1. 6.2 privatemsg.test \PrivatemsgTestCase::setUp()
  2. 6 privatemsg.test \PrivatemsgTestCase::setUp()
  3. 7 privatemsg.test \PrivatemsgTestCase::setUp()

Implements setUp().

Overrides DrupalWebTestCase::setUp

File

./privatemsg.test, line 40
Test file for privatemsg.module

Class

PrivatemsgTestCase

Code

function setUp() {
  parent::setUp('privatemsg');

  // Create the full html format.
  $full_html_format = array(
    'format' => 'full_html',
    'name' => 'Full HTML',
    'weight' => 1,
    'filters' => array(
      // URL filter.
      'filter_url' => array(
        'weight' => 0,
        'status' => 1,
      ),
      // Line break filter.
      'filter_autop' => array(
        'weight' => 1,
        'status' => 1,
      ),
      // HTML corrector filter.
      'filter_htmlcorrector' => array(
        'weight' => 10,
        'status' => 1,
      ),
    ),
  );
  $full_html_format = (object) $full_html_format;
  filter_format_save($full_html_format);

  // Refresh permissions.
  $this
    ->checkPermissions(array(), TRUE);
}