diff --git a/src/Entity/Index.php b/src/Entity/Index.php index 7763f02..7be92cd 100644 --- a/src/Entity/Index.php +++ b/src/Entity/Index.php @@ -61,6 +61,7 @@ use Drupal\views\Views; * "description", * "read_only", * "options", + * "fields", * "processors", * "datasources", * "datasource_configs", @@ -1210,7 +1211,6 @@ class Index extends ConfigEntityBase implements IndexInterface { $this->trackerPlugin = NULL; $this->serverInstance = NULL; $this->cachedFields = NULL; - $this->fields = NULL; $this->datasourceFields = NULL; $this->fulltextFields = NULL; $this->processorInstances = NULL; diff --git a/src/Form/IndexFieldsForm.php b/src/Form/IndexFieldsForm.php index 1ee223f..352ac59 100644 --- a/src/Form/IndexFieldsForm.php +++ b/src/Form/IndexFieldsForm.php @@ -106,8 +106,6 @@ class IndexFieldsForm extends EntityForm { public function buildForm(array $form, FormStateInterface $form_state) { $index = $this->entity; - debug($index->getFields()); - // Set an appropriate page title. $form['#title'] = $this->t('Manage fields for search index %label', array('%label' => $index->label())); $form['#tree'] = TRUE; diff --git a/src/Tests/IntegrationTest.php b/src/Tests/IntegrationTest.php index 7b8888a..2fcc19b 100644 --- a/src/Tests/IntegrationTest.php +++ b/src/Tests/IntegrationTest.php @@ -62,7 +62,6 @@ class IntegrationTest extends WebTestBase { * Tests various operations via the Search API's admin UI. */ public function testFramework() { - $this->drupalLogin($this->adminUser); // Test that the overview page exists and its permissions work. @@ -485,6 +484,10 @@ class IntegrationTest extends WebTestBase { $this->drupalPostForm($this->getIndexPath('fields'), $edit, $this->t('Save changes')); $this->assertText($this->t('The changes were successfully saved.')); + $this->assertFieldChecked('edit-fields-entitynodenid-indexed', 'nid is saved'); + $this->assertFieldChecked('edit-fields-entitynodetitle-indexed', 'title is saved'); + $this->assertFieldChecked('edit-fields-entitynodebody-indexed', 'body is saved'); + $this->indexStorage->resetCache(array($this->indexId)); /** @var $index \Drupal\search_api\IndexInterface */ $index = $this->indexStorage->load($this->indexId);