public function FieldsProcessorPluginBaseTest::testProcessKeysSimple in Search API 8
Tests whether preprocessing of simple search keys works correctly.
File
- tests/
src/ Unit/ Processor/ FieldsProcessorPluginBaseTest.php, line 410
Class
- FieldsProcessorPluginBaseTest
- Tests the base class for fields-based processors.
Namespace
Drupal\Tests\search_api\Unit\ProcessorCode
public function testProcessKeysSimple() {
$query = \Drupal::getContainer()
->get('search_api.query_helper')
->createQuery($this->index);
$keys =& $query
->getKeys();
$keys = 'foo';
$this->processor
->preprocessSearchQuery($query);
$this
->assertEquals('*foo', $query
->getKeys(), 'Search keys were correctly preprocessed.');
}