[ 'name' => 'test_newly_created_field_text',
'type' => CustomFieldTypes::TEXT,
],
],
],
], Context::
createDefaultContext());
$indexName =
array_keys($this->indexDetector->
getAllUsedIndices())[0
];
$indices =
array_values($this->client->
indices()->
getMapping(['index' =>
$indexName]))[0
];
$properties =
$indices['mappings'
]['properties'
]['customFields'
]['properties'
] ??
[];
if (Feature::
isActive('ES_MULTILINGUAL_INDEX'
)) { static::
assertArrayHasKey(Defaults::LANGUAGE_SYSTEM,
$properties);
$properties =
$properties[Defaults::LANGUAGE_SYSTEM
]['properties'
];
static::
assertIsArray($properties);
static::
assertArrayHasKey('test_newly_created_field',
$properties);
static::
assertSame('long',
$properties['test_newly_created_field'
]['type'
]);
static::
assertArrayHasKey('test_newly_created_field_text',
$properties);
static::
assertSame('text',
$properties['test_newly_created_field_text'
]['type'
]);
}