protected function BackendTest::editServerMinChars in Search API 8
Edits the server to change the "Minimum word length" setting.
1 call to BackendTest::editServerMinChars()
- BackendTest::checkBackendSpecificFeatures in modules/
search_api_db/ tests/ src/ Kernel/ BackendTest.php - Checks backend specific features.
File
- modules/
search_api_db/ tests/ src/ Kernel/ BackendTest.php, line 399
Class
- BackendTest
- Tests index and search capabilities using the Database search backend.
Namespace
Drupal\Tests\search_api_db\KernelCode
protected function editServerMinChars() {
$server = $this
->getServer();
$backend_config = $server
->getBackendConfig();
$backend_config['min_chars'] = 4;
$backend_config['matching'] = 'words';
$server
->setBackendConfig($backend_config);
$success = (bool) $server
->save();
$this
->assertTrue($success, 'The server was successfully edited.');
$this
->clearIndex();
$this
->indexItems($this->indexId);
$this
->resetEntityCache();
}