Skip to content
Snippets Groups Projects
Unverified Commit c8b93171 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3132759 by mvonfrie, AaronBauman, anmolgoyal74, jungle, DamienMcKenna:...

Issue #3132759 by mvonfrie, AaronBauman, anmolgoyal74, jungle, DamienMcKenna: ConfigEntityType "missing 'config_export" error message doesn't say what annotation is missing

(cherry picked from commit b2519618)
parent de4d6358
Branches
Tags
6 merge requests!1286issue #3240655 by elfakhar,!1285Issue #3240655 by elfakhar Aligne the active border,!541Issue #3123070: Fix 'PSR2.Classes.PropertyDeclaration.Underscore' coding standard,!463Resolve #3205025 "Class align center for media",!386Allow multiple vocabularies in the taxonomy filter,!308Issue #3118206: Remote media does not validate provider
......@@ -248,7 +248,7 @@ public function toArray() {
$id_key = $entity_type->getKey('id');
$property_names = $entity_type->getPropertiesToExport($this->id());
if (empty($property_names)) {
throw new SchemaIncompleteException(sprintf("Entity type '%s' is missing 'config_export' definition in its annotation", get_class($entity_type)));
throw new SchemaIncompleteException(sprintf("Entity type '%s' is missing 'config_export' definition in its annotation", $entity_type->getClass()));
}
foreach ($property_names as $property_name => $export_name) {
// Special handling for IDs so that computed compound IDs work.
......
......@@ -635,8 +635,11 @@ public function testToArraySchemaException() {
$this->entityType->expects($this->any())
->method('getPropertiesToExport')
->willReturn(NULL);
$this->entityType->expects($this->any())
->method('getClass')
->willReturn("FooConfigEntity");
$this->expectException(SchemaIncompleteException::class);
$this->expectExceptionMessageMatches("/Entity type 'Mock_ConfigEntityTypeInterface_[^']*' is missing 'config_export' definition in its annotation/");
$this->expectExceptionMessage("Entity type 'FooConfigEntity' is missing 'config_export' definition in its annotation");
$this->entity->toArray();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment