Commit 7eaf9abc authored by catch's avatar catch

Issue #2937850 by Wim Leers, plach: Mark revision_default as internal for REST consumers

parent e89abeb2
......@@ -231,6 +231,7 @@ protected function buildBaseFieldDefinitions($entity_type_id) {
->setLabel($this->t('Default revision'))
->setDescription($this->t('A flag indicating whether this was a default revision when it was saved.'))
->setStorageRequired(TRUE)
->setInternal(TRUE)
->setTranslatable(FALSE)
->setRevisionable(TRUE);
}
......
......@@ -83,6 +83,8 @@ public function testNodeTranslation() {
$this->assertSame($node->getTitle(), $denormalized_node->getTitle());
$this->assertSame($translation->getTitle(), $denormalized_node->getTranslation('de')->getTitle());
$original_values['revision_default'] = [];
$original_translation_values['revision_default'] = [];
$this->assertEquals($original_values, $denormalized_node->toArray(), 'Node values are restored after normalizing and denormalizing.');
$this->assertEquals($original_translation_values, $denormalized_node->getTranslation('en')->toArray(), 'Node values are restored after normalizing and denormalizing.');
}
......
......@@ -122,11 +122,6 @@ protected function getExpectedNormalizedEntity() {
'value' => TRUE,
],
],
'revision_default' => [
[
'value' => TRUE,
],
],
'default_langcode' => [
[
'value' => TRUE,
......
......@@ -212,11 +212,6 @@ protected function getExpectedNormalizedEntity() {
'value' => TRUE,
],
],
'revision_default' => [
[
'value' => TRUE,
],
],
];
}
......
......@@ -152,11 +152,6 @@ protected function getExpectedNormalizedEntity() {
'value' => TRUE,
],
],
'revision_default' => [
[
'value' => TRUE,
],
],
'default_langcode' => [
[
'value' => TRUE,
......
......@@ -150,9 +150,6 @@ public function testNormalize() {
'default_langcode' => [
['value' => TRUE],
],
'revision_default' => [
['value' => TRUE],
],
'revision_translation_affected' => [
['value' => TRUE],
],
......@@ -229,7 +226,6 @@ public function testSerialize() {
'user_id' => '<user_id><target_id>' . $this->user->id() . '</target_id><target_type>' . $this->user->getEntityTypeId() . '</target_type><target_uuid>' . $this->user->uuid() . '</target_uuid><url>' . $this->user->url() . '</url></user_id>',
'revision_id' => '<revision_id><value>' . $this->entity->getRevisionId() . '</value></revision_id>',
'default_langcode' => '<default_langcode><value>1</value></default_langcode>',
'revision_default' => '<revision_default><value>1</value></revision_default>',
'revision_translation_affected' => '<revision_translation_affected><value>1</value></revision_translation_affected>',
'non_mul_field' => '<non_mul_field/>',
'non_rev_field' => '<non_rev_field/>',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment