protected function IntegrationTest::addFieldsToIndex in Facets 8
Add fields to Search API index.
File
- tests/
src/ Functional/ IntegrationTest.php, line 1137
Class
- IntegrationTest
- Tests the overall functionality of the Facets admin UI.
Namespace
Drupal\Tests\facets\FunctionalCode
protected function addFieldsToIndex() {
$edit = [
'fields[entity:node/nid][indexed]' => 1,
'fields[entity:node/title][indexed]' => 1,
'fields[entity:node/title][type]' => 'text',
'fields[entity:node/title][boost]' => '21.0',
'fields[entity:node/body][indexed]' => 1,
'fields[entity:node/uid][indexed]' => 1,
'fields[entity:node/uid][type]' => 'search_api_test_data_type',
];
$this
->drupalPostForm('admin/config/search/search-api/index/webtest_index/fields', $edit, 'Save changes');
$this
->assertSession()
->pageTextContains('The changes were successfully saved.');
}