Sync Craft Setups.
Автор: Nerds & Company
Наследование: extends Base
Пример #1
0
 /**
  * Test users service import.
  *
  * @covers ::import
  */
 public function testUsersServiceImportWithImportError()
 {
     $mockFieldsService = $this->getMockFieldServiceForImport(false);
     $mockSchematicFieldsService = $this->getMockSchematicFieldServiceForImport(true);
     $this->setComponent(Craft::app(), 'fields', $mockFieldsService);
     $this->setComponent(Craft::app(), 'schematic_fields', $mockSchematicFieldsService);
     $import = $this->schematicUsersService->import([]);
     $this->assertTrue($import instanceof Result);
     $this->assertTrue($import->hasErrors('errors'));
 }