.../EntityResource/Node/NodeResourceTestBase.php | 14 ++++++++------ .../EntityResource/Term/TermResourceTestBase.php | 4 +++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php index bbdd0e5..492ff64 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeResourceTestBase.php @@ -240,12 +240,14 @@ public function testPatchPath() { // EntityResource::patch() will ignore any fields that are sent that // match the current value (and obviously we're sending the current // value). - unset($normalization['revision_timestamp']); - unset($normalization['revision_uid']); - unset($normalization['created']); - unset($normalization['changed']); - unset($normalization['promote']); - unset($normalization['sticky']); + $normalization = $this->removeFieldsFromNormalization($normalization, [ + 'revision_timestamp', + 'revision_uid', + 'created', + 'changed', + 'promote', + 'sticky', + ]); // Change node's path alias. $normalization['path'][0]['alias'] .= 's-rule-the-world'; diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php index 68e6a2e..7b9ee5c 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermResourceTestBase.php @@ -203,7 +203,9 @@ public function testPatchPath() { // EntityResource::patch() will ignore any fields that are sent that // match the current value (and obviously we're sending the current // value). - unset($normalization['changed']); + $normalization = $this->removeFieldsFromNormalization($normalization, [ + 'changed', + ]); // Change term's path alias. $normalization['path'][0]['alias'] .= 's-rule-the-world';