/** * Test default import functionality. * * @covers ::import */ public function testImport() { $data = $this->getElementIndexSettingsData(); $mockElementIndexesService = $this->getMockElementIndexesService($data); $this->setComponent(Craft::app(), 'elementIndexes', $mockElementIndexesService); $import = $this->schematicElementIndexSettingsService->import($data); $this->assertTrue($import instanceof Result); $this->assertTrue($import->hasErrors()); }