You are here

protected function FileResourceTestBase::getNormalizedPostEntity in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::getNormalizedPostEntity()
  2. 9 core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php \Drupal\Tests\file\Functional\Rest\FileResourceTestBase::getNormalizedPostEntity()

Returns the normalized POST entity.

Return value

array

Overrides EntityResourceTestBase::getNormalizedPostEntity

See also

::testPost

1 call to FileResourceTestBase::getNormalizedPostEntity()
FileResourceTestBase::getNormalizedPatchEntity in core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
Returns the normalized PATCH entity.

File

core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php, line 163

Class

FileResourceTestBase

Namespace

Drupal\Tests\file\Functional\Rest

Code

protected function getNormalizedPostEntity() {
  return [
    'uid' => [
      [
        'target_id' => $this->author
          ->id(),
      ],
    ],
    'filename' => [
      [
        'value' => 'drupal.txt',
      ],
    ],
  ];
}