protected function SearchCrudTest::getSearchTestValues in Search API Autocomplete 8
Retrieves properties for creating a test search entity.
Return value
array Properties for an Autocomplete Search entity.
4 calls to SearchCrudTest::getSearchTestValues()
- SearchCrudTest::testCreate in tests/
src/ Kernel/ SearchCrudTest.php - Tests whether saving a new search entity works correctly.
- SearchCrudTest::testDelete in tests/
src/ Kernel/ SearchCrudTest.php - Tests whether deleting a search entity works correctly.
- SearchCrudTest::testLoad in tests/
src/ Kernel/ SearchCrudTest.php - Tests whether loading a search entity works correctly.
- SearchCrudTest::testUpdate in tests/
src/ Kernel/ SearchCrudTest.php - Tests whether updating a search entity works correctly.
File
- tests/
src/ Kernel/ SearchCrudTest.php, line 182
Class
- SearchCrudTest
- Tests saving a Search API autocomplete config entity.
Namespace
Drupal\Tests\search_api_autocomplete\KernelCode
protected function getSearchTestValues() {
return [
'id' => 'muh',
'label' => 'Meh',
'index_id' => 'autocomplete_search_index',
'suggester_settings' => [
'server' => [
'fields' => [
'foo',
'bar',
],
],
],
'suggester_weights' => [
'server' => -10,
],
'suggester_limits' => [
'server' => 5,
],
'search_settings' => [
'search_api_autocomplete_test' => [
'foo' => 'bar',
],
],
'options' => [
'limit' => 8,
'min_length' => 2,
'show_count' => TRUE,
'delay' => 1338,
'submit_button_selector' => '#edit-submit',
'autosubmit' => TRUE,
],
];
}