Loading core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +6 −4 Original line number Diff line number Diff line Loading @@ -227,10 +227,12 @@ protected function setUp(): void { ->setTranslatable(FALSE) ->save(); $entity_id = $this->entity->id(); // Some entity types have no ID, hence they cannot be reloaded. if ($entity_id !== NULL) { // Reload entity so that it has the new field. $reloaded_entity = $this->entityStorage->loadUnchanged($this->entity->id()); // Some entity types are not stored, hence they cannot be reloaded. if ($reloaded_entity !== NULL) { $reloaded_entity = $this->entityStorage->loadUnchanged($entity_id); $this->entity = $reloaded_entity; // Set a default value on the fields. Loading Loading
core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +6 −4 Original line number Diff line number Diff line Loading @@ -227,10 +227,12 @@ protected function setUp(): void { ->setTranslatable(FALSE) ->save(); $entity_id = $this->entity->id(); // Some entity types have no ID, hence they cannot be reloaded. if ($entity_id !== NULL) { // Reload entity so that it has the new field. $reloaded_entity = $this->entityStorage->loadUnchanged($this->entity->id()); // Some entity types are not stored, hence they cannot be reloaded. if ($reloaded_entity !== NULL) { $reloaded_entity = $this->entityStorage->loadUnchanged($entity_id); $this->entity = $reloaded_entity; // Set a default value on the fields. Loading