public function IgnoreCharacterTest::testIgnoreCharacterSets in Search API 8
Tests preprocessing with different ignorable character sets.
@dataProvider ignoreCharacterSetsDataProvider
Parameters
string $passed_value: The value that should be passed into process().
string $expected_value: The expected processed value.
string[] $character_classes: The "ignorable_classes" setting to set on the processor.
File
- tests/
src/ Unit/ Processor/ IgnoreCharacterTest.php, line 43
Class
- IgnoreCharacterTest
- Tests the "Ignore characters" processor.
Namespace
Drupal\Tests\search_api\Unit\ProcessorCode
public function testIgnoreCharacterSets($passed_value, $expected_value, array $character_classes) {
$this->processor
->setConfiguration([
'ignorable_classes' => $character_classes,
]);
$this
->invokeMethod('process', [
&$passed_value,
'text',
]);
$this
->assertEquals($expected_value, $passed_value);
}