You are here

function PrivatemsgAPITestCase::setUp in Privatemsg 7

Same name and namespace in other branches
  1. 6.2 privatemsg.test \PrivatemsgAPITestCase::setUp()
  2. 6 tests/privatemsgapi.test \PrivatemsgAPITestCase::setUp()
  3. 7.2 privatemsg.test \PrivatemsgAPITestCase::setUp()

Implements setUp().

Overrides DrupalWebTestCase::setUp

File

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

Class

PrivatemsgAPITestCase
Privatemsg API tests

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);
}