You are here

function _pathologic_build_format in Pathologic 7.3

Build a text format with Pathologic configured a certain way.

Parameters

$settings: An array of settings for the Pathologic instance on the format.

Return value

A format machine name (consisting of random characters) for the format.

1 call to _pathologic_build_format()
PathologicTestCase::testPathologic in tests/pathologic.test

File

tests/pathologic.test, line 273
Pathologic behavior testing.

Code

function _pathologic_build_format($settings) {
  $format_id = user_password();
  $format = (object) array(
    'format' => $format_id,
    'name' => $format_id,
    'filters' => array(
      'pathologic' => array(
        'status' => 1,
        'settings' => $settings,
      ),
    ),
  );
  filter_format_save($format);
  return $format_id;
}