You are here

protected function TestFieldsProcessorPlugin::testField in Search API 8

Tests whether a certain field should be processed.

Parameters

string $name: The field's ID.

\Drupal\search_api\Item\FieldInterface $field: The field's information.

Return value

bool TRUE if the field should be processed, FALSE otherwise.

Overrides FieldsProcessorPluginBase::testField

File

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

Class

TestFieldsProcessorPlugin
Mimics a processor working on individual fields of items.

Namespace

Drupal\Tests\search_api\Unit\Processor

Code

protected function testField($name, FieldInterface $field) {
  if (isset($this->methodOverrides[__FUNCTION__])) {
    return $this->methodOverrides[__FUNCTION__]($name, $field);
  }
  return parent::testField($name, $field);
}