You are here

public function TokenizerTest::testProcessFieldValue in Search API 8

Tests the processFieldValue() method.

@dataProvider textDataProvider

Parameters

string $passed_value: The field value passed to the processor's processFieldValue() method.

string $expected_value: The expected preprocessed value.

array $config: (optional) Configuration to override the processor's defaults.

File

tests/src/Unit/Processor/TokenizerTest.php, line 45

Class

TokenizerTest
Tests the "Tokenizer" processor.

Namespace

Drupal\Tests\search_api\Unit\Processor

Code

public function testProcessFieldValue($passed_value, $expected_value, array $config = []) {
  if ($config) {
    $this->processor
      ->setConfiguration($config);
  }
  $type = 'text';
  $this
    ->invokeMethod('processFieldValue', [
    &$passed_value,
    $type,
  ]);
  $this
    ->assertEquals($expected_value, $passed_value);
}