public function HtmlFilterTest::testTagConfiguration in Search API 8
Tests preprocessing field values with "alt" settings.
@dataProvider tagConfigurationDataProvider
Parameters
string $passed_value: The value that should be passed into process().
mixed $expected_value: The expected processed value.
float[] $tags_config: The value to set for the processor's "tags" setting.
File
- tests/
src/ Unit/ Processor/ HtmlFilterTest.php, line 165
Class
- HtmlFilterTest
- Tests the "HTML filter" processor.
Namespace
Drupal\Tests\search_api\Unit\ProcessorCode
public function testTagConfiguration($passed_value, $expected_value, array $tags_config) {
$configuration = [
'tags' => $tags_config,
'title' => TRUE,
'alt' => TRUE,
];
$this->processor
->setConfiguration($configuration);
$type = 'text';
$this
->invokeMethod('processFieldValue', [
&$passed_value,
$type,
]);
$this
->assertEquals($expected_value, $passed_value);
}