export() публичный Метод

Export user settings.
public export ( array $users = [] ) : array
$users array
Результат array
Пример #1
0
 /**
  * Test users service export.
  *
  * @covers ::export
  */
 public function testUsersServiceExport()
 {
     $mockI18n = $this->getMockLocalizationService();
     $mockFieldLayout = $this->getMockFieldLayout();
     $mockFieldsService = $this->getMockFieldsService();
     $mockFieldsService->expects($this->exactly(1))->method('getLayoutByType')->willReturn($mockFieldLayout);
     $mockSchematicFieldsService = $this->getMockSchematicFieldsService();
     $mockSchematicFieldsService->expects($this->exactly(1))->method('getFieldLayoutDefinition')->willReturn([]);
     $this->setComponent(Craft::app(), 'i18n', $mockI18n);
     $this->setComponent(Craft::app(), 'fields', $mockFieldsService);
     $this->setComponent(Craft::app(), 'schematic_fields', $mockSchematicFieldsService);
     $export = $this->schematicUsersService->export();
     $this->assertArrayHasKey('fieldLayout', $export);
 }