You are here

protected function FileResourceTestBase::getNormalizedPostEntity in Drupal 9

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. 10 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

2 calls to FileResourceTestBase::getNormalizedPostEntity()
FileHalJsonAnonTest::getNormalizedPostEntity in core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php
Returns the normalized POST entity.
FileResourceTestBase::getNormalizedPatchEntity in core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php
Returns the normalized PATCH entity.
1 method overrides FileResourceTestBase::getNormalizedPostEntity()
FileHalJsonAnonTest::getNormalizedPostEntity in core/modules/file/tests/src/Functional/Hal/FileHalJsonAnonTest.php
Returns the normalized POST 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',
      ],
    ],
  ];
}