Loading core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php +3 −2 Original line number Diff line number Diff line Loading @@ -333,9 +333,10 @@ protected function setUpFields(EntityInterface $entity, UserInterface $account): */ protected function resaveEntity(EntityInterface $entity, AccountInterface $account): EntityInterface { // Reload entity so that it has the new field. $reloaded_entity = $this->entityLoadUnchanged($entity->id()); $entity_id = $entity->id(); // Some entity types are not stored, hence they cannot be reloaded. if ($reloaded_entity !== NULL) { if ($entity_id !== NULL) { $reloaded_entity = $this->entityLoadUnchanged($entity_id); $entity = $reloaded_entity; // Set a default value on the fields. $entity->set('field_rest_test', ['value' => 'All the faith he had had had had no effect on the outcome of his life.']); Loading Loading
core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php +3 −2 Original line number Diff line number Diff line Loading @@ -333,9 +333,10 @@ protected function setUpFields(EntityInterface $entity, UserInterface $account): */ protected function resaveEntity(EntityInterface $entity, AccountInterface $account): EntityInterface { // Reload entity so that it has the new field. $reloaded_entity = $this->entityLoadUnchanged($entity->id()); $entity_id = $entity->id(); // Some entity types are not stored, hence they cannot be reloaded. if ($reloaded_entity !== NULL) { if ($entity_id !== NULL) { $reloaded_entity = $this->entityLoadUnchanged($entity_id); $entity = $reloaded_entity; // Set a default value on the fields. $entity->set('field_rest_test', ['value' => 'All the faith he had had had had no effect on the outcome of his life.']); Loading