only in patch2: unchanged: --- a/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php +++ b/core/modules/serialization/tests/src/Kernel/EntitySerializationTest.php @@ -29,7 +29,7 @@ class EntitySerializationTest extends NormalizerTestBase { /** * The test entity. * - * @var \Drupal\Core\Entity\ContentEntityBase + * @var \Drupal\Core\Entity\ContentEntityInterface|\Drupal\Core\Entity\RevisionLogInterface */ protected $entity; @@ -123,6 +123,11 @@ public function testNormalize() { array('value' => TRUE), ), 'non_rev_field' => array(), + 'revision_created' => array( + array('value' => $this->entity->getRevisionCreationTime()), + ), + 'revision_user' => array(), + 'revision_log_message' => array(), 'field_test_text' => array( array( 'value' => $this->values['field_test_text']['value'], @@ -192,6 +197,9 @@ public function testSerialize() { 'revision_id' => '' . $this->entity->getRevisionId() . '', 'default_langcode' => '1', 'non_rev_field' => '', + 'revision_created' => '' . $this->entity->getRevisionCreationTime() . '', + 'revision_user' => '', + 'revision_log_message' => '', 'field_test_text' => '' . $this->values['field_test_text']['value'] . '' . $this->values['field_test_text']['format'] . '', ); // Sort it in the same order as normalised. only in patch2: unchanged: --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php @@ -12,7 +12,7 @@ * "view_builder" = "Drupal\entity_test\EntityTestViewBuilder", * "access" = "Drupal\entity_test\EntityTestAccessControlHandler", * "form" = { - * "default" = "Drupal\entity_test\EntityTestForm", + * "default" = "Drupal\entity_test\EntityTestRevisionForm", * "delete" = "Drupal\entity_test\EntityTestDeleteForm" * }, * "translation" = "Drupal\content_translation\ContentTranslationHandler", only in patch2: unchanged: --- a/core/modules/views/tests/src/Unit/EntityViewsDataTest.php +++ b/core/modules/views/tests/src/Unit/EntityViewsDataTest.php @@ -89,6 +89,12 @@ protected function setUp() { $typed_data_manager->expects($this->any()) ->method('createDataDefinition') ->willReturn($this->getMock('Drupal\Core\TypedData\DataDefinitionInterface')); + + $typed_data_manager->expects($this->any()) + ->method('getDefinition') + ->with($this->equalTo('field_item:string_long')) + ->willReturn(array('class' => '\Drupal\Core\Field\Plugin\Field\FieldType\StringLongItem')); + $this->baseEntityType = new TestEntityType([ 'base_table' => 'entity_test', 'id' => 'entity_test', @@ -1107,3 +1113,12 @@ function t($string, array $args = []) { return strtr($string, $args); } } + + +namespace Drupal\Core\Entity; + +if (!function_exists('t')) { + function t($string, array $args = []) { + return strtr($string, $args); + } +} only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php @@ -3,6 +3,7 @@ namespace Drupal\KernelTests\Core\Entity; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\RevisionLogInterface; use Drupal\Core\Entity\TypedData\EntityDataDefinition; use Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface; use Drupal\Core\Field\BaseFieldDefinition; @@ -572,6 +573,12 @@ protected function doTestDataStructureInterfaces($entity_type) { // Field format. NULL, ); + + if ($entity instanceof RevisionLogInterface) { + // Adding empty string for revision message. + $target_strings[] = ''; + } + asort($strings); asort($target_strings); $this->assertEqual(array_values($strings), array_values($target_strings), format_string('%entity_type: All contained strings found.', array('%entity_type' => $entity_type)));