diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php index 8152069..d087db2 100644 --- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php +++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php @@ -135,9 +135,12 @@ public function basicModerationTestCases() { 'Nodes' => [ 'node', ], - 'Entity Test with Bundle' => [ + 'Test Entity with Bundle' => [ 'entity_test_with_bundle', ], + 'Publishable Test Entity with Bundle' => [ + 'entity_test_publish_with_bundle', + ], ]; } diff --git a/core/modules/system/tests/modules/entity_test/config/schema/entity_test.schema.yml b/core/modules/system/tests/modules/entity_test/config/schema/entity_test.schema.yml index d34d949..bb84c24 100644 --- a/core/modules/system/tests/modules/entity_test/config/schema/entity_test.schema.yml +++ b/core/modules/system/tests/modules/entity_test/config/schema/entity_test.schema.yml @@ -27,3 +27,17 @@ entity_test.entity_test_bundle.*: description: type: text label: 'Description' + +entity_test.entity_test_publish_bundle.*: + type: config_entity + label: 'Publishale entity test bundle' + mapping: + label: + type: label + label: 'Label' + id: + type: string + label: 'Machine-readable name' + description: + type: text + label: 'Description' diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishBundle.php index e69de29..0ca1a86 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishBundle.php @@ -0,0 +1,78 @@ +description; + } + + /** + * {@inheritdoc} + */ + public function setDescription($description) { + $this->description = $description; + return $this; + } + +} diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishWithBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishWithBundle.php index e69de29..2173547 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishWithBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestPublishWithBundle.php @@ -0,0 +1,81 @@ +setLabel(t('Name')) + ->setDescription(t('The name of the test entity.')) + ->setTranslatable(TRUE) + ->setSetting('max_length', 32) + ->setDisplayOptions('view', [ + 'label' => 'hidden', + 'type' => 'string', + 'weight' => -5, + ]) + ->setDisplayOptions('form', [ + 'type' => 'string_textfield', + 'weight' => -5, + ]); + return $fields; + } + +} diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php index 532fac2..c668bd3 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestWithBundle.php @@ -33,7 +33,6 @@ * "bundle" = "type", * "label" = "name", * "langcode" = "langcode", - * "published" = "status", * }, * bundle_entity_type = "entity_test_bundle", * links = {