You are here

protected function TestFieldsProcessorPlugin::testType in Search API 8

Determines whether a field of a certain type should be preprocessed.

The default implementation returns TRUE for "text" and "string".

Parameters

string $type: The type of the field (either when preprocessing the field at index time, or a condition on the field at query time).

Return value

bool TRUE if fields of that type should be processed, FALSE otherwise.

Overrides FieldsProcessorPluginBase::testType

File

tests/src/Unit/Processor/TestFieldsProcessorPlugin.php, line 79

Class

TestFieldsProcessorPlugin
Mimics a processor working on individual fields of items.

Namespace

Drupal\Tests\search_api\Unit\Processor

Code

protected function testType($type) {
  if (isset($this->methodOverrides[__FUNCTION__])) {
    return $this->methodOverrides[__FUNCTION__]($type);
  }
  return parent::testType($type);
}