Issue #2942522 by Wim Leers: Follow-up for #2543726: remove work-around in POST test coverage for bug in Term entity type that has been fixed

merge-requests/1654/head
Alex Pott 2018-02-08 08:26:27 +00:00
parent 3c43071ab7
commit 678a4c8029
1 changed files with 1 additions and 5 deletions

View File

@ -906,11 +906,7 @@ abstract class EntityResourceTestBase extends ResourceTestBase {
// contains the serialized created entity.
$created_entity = $this->entityStorage->loadUnchanged(static::$firstCreatedEntityId);
$created_entity_normalization = $this->serializer->normalize($created_entity, static::$format, ['account' => $this->account]);
// @todo Remove this if-test in https://www.drupal.org/node/2543726: execute
// its body unconditionally.
if (static::$entityTypeId !== 'taxonomy_term') {
$this->assertSame($created_entity_normalization, $this->serializer->decode((string) $response->getBody(), static::$format));
}
$this->assertSame($created_entity_normalization, $this->serializer->decode((string) $response->getBody(), static::$format));
// Assert that the entity was indeed created using the POSTed values.
foreach ($this->getNormalizedPostEntity() as $field_name => $field_normalization) {
// Some top-level keys in the normalization may not be fields on the