function EditorManagerTest::setUp

Sets up Drupal unit test environment.

Overrides DrupalUnitTestBase::setUp

See also

DrupalUnitTestBase::$modules

DrupalUnitTestBase

File

drupal/core/modules/editor/lib/Drupal/editor/Tests/EditorManagerTest.php, line 41
Definition of \Drupal\editor\Tests\EditorManagerTest.

Class

EditorManagerTest
Unit tests for the configurable text editor manager.

Namespace

Drupal\editor\Tests

Code

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

  // Install the Filter module.
  $this
    ->installSchema('system', 'url_alias');
  $this
    ->enableModules(array(
    'user',
    'filter',
  ));

  // Add text formats.
  $filtered_html_format = entity_create('filter_format', array(
    'format' => 'filtered_html',
    'name' => 'Filtered HTML',
    'weight' => 0,
    'filters' => array(),
  ));
  $filtered_html_format
    ->save();
  $full_html_format = entity_create('filter_format', array(
    'format' => 'full_html',
    'name' => 'Full HTML',
    'weight' => 1,
    'filters' => array(),
  ));
  $full_html_format
    ->save();
}