protected function MenuLinkContentResourceTestBase::getExpectedNormalizedEntity in Drupal 8
Same name and namespace in other branches
- 9 core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php \Drupal\Tests\menu_link_content\Functional\Rest\MenuLinkContentResourceTestBase::getExpectedNormalizedEntity()
- 10 core/modules/menu_link_content/tests/src/Functional/Rest/MenuLinkContentResourceTestBase.php \Drupal\Tests\menu_link_content\Functional\Rest\MenuLinkContentResourceTestBase::getExpectedNormalizedEntity()
Returns the expected normalization of the entity.
Return value
array
Overrides EntityResourceTestBase::getExpectedNormalizedEntity
See also
::createEntity()
1 call to MenuLinkContentResourceTestBase::getExpectedNormalizedEntity()
- MenuLinkContentHalJsonAnonTest::getExpectedNormalizedEntity in core/
modules/ menu_link_content/ tests/ src/ Functional/ Hal/ MenuLinkContentHalJsonAnonTest.php - Returns the expected normalization of the entity.
1 method overrides MenuLinkContentResourceTestBase::getExpectedNormalizedEntity()
- MenuLinkContentHalJsonAnonTest::getExpectedNormalizedEntity in core/
modules/ menu_link_content/ tests/ src/ Functional/ Hal/ MenuLinkContentHalJsonAnonTest.php - Returns the expected normalization of the entity.
File
- core/
modules/ menu_link_content/ tests/ src/ Functional/ Rest/ MenuLinkContentResourceTestBase.php, line 111
Class
- MenuLinkContentResourceTestBase
- ResourceTestBase for MenuLinkContent entity.
Namespace
Drupal\Tests\menu_link_content\Functional\RestCode
protected function getExpectedNormalizedEntity() {
return [
'uuid' => [
[
'value' => $this->entity
->uuid(),
],
],
'id' => [
[
'value' => 1,
],
],
'revision_id' => [
[
'value' => 1,
],
],
'title' => [
[
'value' => 'Llama Gabilondo',
],
],
'link' => [
[
'uri' => 'https://nl.wikipedia.org/wiki/Llama',
'title' => NULL,
'options' => [
'fragment' => 'a-fragment',
'attributes' => [
'class' => [
'example-class',
],
],
],
],
],
'weight' => [
[
'value' => 0,
],
],
'menu_name' => [
[
'value' => 'main',
],
],
'langcode' => [
[
'value' => 'en',
],
],
'bundle' => [
[
'value' => 'menu_link_content',
],
],
'description' => [
[
'value' => 'Llama Gabilondo',
],
],
'external' => [
[
'value' => FALSE,
],
],
'rediscover' => [
[
'value' => FALSE,
],
],
'expanded' => [
[
'value' => FALSE,
],
],
'enabled' => [
[
'value' => TRUE,
],
],
'changed' => [
$this
->formatExpectedTimestampItemValues($this->entity
->getChangedTime()),
],
'default_langcode' => [
[
'value' => TRUE,
],
],
'parent' => [],
'revision_created' => [
$this
->formatExpectedTimestampItemValues((int) $this->entity
->getRevisionCreationTime()),
],
'revision_user' => [],
'revision_log_message' => [],
'revision_translation_affected' => [
[
'value' => TRUE,
],
],
];
}