diff --git a/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonAnonTest.php b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonAnonTest.php new file mode 100644 index 0000000..d1d4a74 --- /dev/null +++ b/core/modules/hal/tests/src/Functional/EntityResource/EntityViewMode/EntityViewModeHalJsonAnonTest.php @@ -0,0 +1,30 @@ +grantPermissionsToTestedRole(['administer display modes']); + } + + /** + * {@inheritdoc} + */ + protected function createEntity() { + $entity_view_mode = EntityViewMode::create([ + 'id' => 'user.test', + 'label' => 'Test', + 'targetEntityType' => 'user', + ]); + $entity_view_mode->save(); + return $entity_view_mode; + } + + /** + * {@inheritdoc} + */ + protected function getExpectedNormalizedEntity() { + return [ + 'cache' => TRUE, + 'dependencies' => [ + 'module' => [ + 'user', + ], + ], + 'id' => 'user.test', + 'label' => 'Test', + 'langcode' => 'en', + 'status' => TRUE, + 'targetEntityType' => 'user', + 'uuid' => $this->entity->uuid(), + ]; + } + + /** + * {@inheritdoc} + */ + protected function getNormalizedPostEntity() { + // @todo Update in https://www.drupal.org/node/2300677. + } + +}