public function FieldsProcessorPluginBaseTest::setUp in Search API 8
Creates a new processor object for use in the tests.
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Processor/ FieldsProcessorPluginBaseTest.php, line 40
Class
- FieldsProcessorPluginBaseTest
- Tests the base class for fields-based processors.
Namespace
Drupal\Tests\search_api\Unit\ProcessorCode
public function setUp() {
parent::setUp();
$this
->setUpMockContainer();
$this->index = $this
->createMock(IndexInterface::class);
$this->index
->expects($this
->any())
->method('status')
->will($this
->returnValue(TRUE));
$items = $this
->getTestItem();
$fields = $items[$this->itemIds[0]]
->getFields();
$this->index
->expects($this
->any())
->method('getFields')
->will($this
->returnValue($fields));
$this->processor = new TestFieldsProcessorPlugin([
'#index' => $this->index,
], '', []);
}