You are here

public function HtmlFilterTest::setUp in Search API Solr 8.3

Same name and namespace in other branches
  1. 4.x tests/src/Kernel/Processor/HtmlFilterTest.php \Drupal\Tests\search_api_solr\Kernel\Processor\HtmlFilterTest::setUp()

Performs setup tasks before each individual test method is run.

Installs commonly used schemas and sets up a search server and an index, with the specified processor enabled.

Parameters

string|null $processor: (optional) The plugin ID of the processor that should be set up for testing.

Overrides ProcessorTestBase::setUp

File

tests/src/Kernel/Processor/HtmlFilterTest.php, line 44

Class

HtmlFilterTest
Tests usages of Solr payloads.

Namespace

Drupal\Tests\search_api_solr\Kernel\Processor

Code

public function setUp($processor = NULL) {
  parent::setUp('html_filter');
  $this
    ->enableSolrServer();
  $this
    ->installConfig([
    'filter',
  ]);

  // Create a node type for testing.
  $type = NodeType::create([
    'type' => 'page',
    'name' => 'page',
  ]);
  $type
    ->save();
}