public function TransliterationTest::testTransliterationWithDouble in Search API 8
Tests that floating point numbers are not affected.
File
- tests/
src/ Unit/ Processor/ TransliterationTest.php, line 65
Class
- TransliterationTest
- Tests the "Transliteration" processor.
Namespace
Drupal\Tests\search_api\Unit\ProcessorCode
public function testTransliterationWithDouble() {
$field_value = 3.14;
/** @var \Drupal\search_api\Item\FieldInterface $field */
$items = $this
->createSingleFieldItem($this->index, 'double', $field_value, $field);
$this->processor
->preprocessIndexItems($items);
$this
->assertEquals([
$field_value,
], $field
->getValues(), 'Floating point number not affected by transliteration.');
}