/** * Tests whether selecting fields works correctly. */ public function testTestField() { // testType() shouldn't have any effect anymore when fields are configured. $override = function () { return FALSE; }; $this->processor->setMethodOverride('testType', $override); $configuration['fields'] = array('text_field' => 'text_field', 'float_field' => 'float_field'); $this->processor->setConfiguration($configuration); $items = $this->getTestItem(); $this->processor->preprocessIndexItems($items); $this->assertFieldsProcessed($items, array('text_field', 'float_field')); }