You are here

protected function FilterHtmlTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/filter/tests/src/Unit/FilterHtmlTest.php \Drupal\Tests\filter\Unit\FilterHtmlTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/filter/tests/src/Unit/FilterHtmlTest.php, line 22

Class

FilterHtmlTest
@coversDefaultClass \Drupal\filter\Plugin\Filter\FilterHtml @group filter

Namespace

Drupal\Tests\filter\Unit

Code

protected function setUp() {
  parent::setUp();
  $configuration['settings'] = [
    'allowed_html' => '<a href> <p> <em> <strong> <cite> <blockquote> <code class="pretty boring align-*"> <ul alpaca-*="wooly-* strong"> <ol llama-*> <li> <dl> <dt> <dd> <br> <h3 id>',
    'filter_html_help' => 1,
    'filter_html_nofollow' => 0,
  ];
  $this->filter = new FilterHtml($configuration, 'filter_html', [
    'provider' => 'test',
  ]);
  $this->filter
    ->setStringTranslation($this
    ->getStringTranslationStub());
}