You are here

public function StopwordsTest::testProcess in Search API 8

Tests the process() method of the Stopwords processor.

@dataProvider processDataProvider

Parameters

string $passed_value: The string that should be passed to process().

string $expected_value: The expected altered string.

string[] $stopwords: The stopwords with which to configure the test processor.

File

tests/src/Unit/Processor/StopwordsTest.php, line 41

Class

StopwordsTest
Tests the "Stopwords" processor.

Namespace

Drupal\Tests\search_api\Unit\Processor

Code

public function testProcess($passed_value, $expected_value, array $stopwords) {
  $this->processor
    ->setConfiguration([
    'stopwords' => $stopwords,
  ]);
  $this
    ->invokeMethod('process', [
    &$passed_value,
  ]);
  $this
    ->assertEquals($expected_value, $passed_value);
}