diff -u b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php --- b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -696,7 +696,7 @@ // DX: 422 when invalid entity: UUID field too long. // @todo Fix this in https://www.drupal.org/node/2149851. - if ($this->entity->uuid()) { + if ($this->entity->getEntityType()->hasKey('uuid')) { $response = $this->request('POST', $url, $request_options); $this->assertResourceErrorResponse(422, "Unprocessable Entity: validation failed.\nuuid.0.value: UUID: may not be longer than 128 characters.\n", $response); } diff -u b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php --- b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemResourceTestBase.php @@ -55,13 +55,13 @@ */ protected function createEntity() { // Create a "Camelids" feed. - $feed = Feed::create(array( + $feed = Feed::create([ 'title' => 'Camelids', 'url' => 'https://groups.drupal.org/not_used/167169', 'refresh' => 900, 'checked' => 1389919932, 'description' => 'Drupal Core Group feed', - )); + ]); $feed->save(); // Create a "Llama" item. @@ -95,7 +95,7 @@ ], 'fid' => [ [ - 'target_id' => (int) $feed->id(), + 'target_id' => 1, 'target_type' => 'aggregator_feed', 'target_uuid' => $feed->uuid(), 'url' => $feed->toUrl()->toString(),